Closed AndreVictor closed 2 years ago
some probleme
@luangjokaj Yeah I've experimented quite a few times with using ES Modules with node. And even though they recommend that now, I only run into problems with it.
In my opinion, we should go back to CommonJS until Node handles ESM better. Or the ecosystem catches up with ESM. I don't think it's worth the effort right now.
you must use this code to solve @ribaricplusplus @jumxxxx @AndreVictor
import dartSass from 'sass';
import gulpSass from 'gulp-sass';
const sass = gulpSass(dartSass);
you must use this code to solve @ribaricplusplus @jumxxxx @AndreVictor
import dartSass from 'sass'; import gulpSass from 'gulp-sass'; const sass = gulpSass(dartSass);
Thank you, just tested and works. Updated also the docs: https://www.wordpressify.co/docs/css-postcss-and-sass
I`m tring to import the gulp-sass and I'm getting an error witch say that 'gulp-sass 5 does not have a default Sass compiler'. I was using require in lasted versions for sass compile, like that:
const sass = require('gulp-sass')(require('sass'));
However, looks like that wordpressify is now using 'import' insted of 'require'. How can I fix this?
ps.: In the documentation say to use gulp-sass with require