#gulp #ecmascript-6 #babeljs #postcss
#gulp #ecmascript-6 #babeljs #postcss
Вопрос:
Я не могу понять, в чем проблема и как ее решить
https://github.com/LPGhatguy/postcss-sassy-import/blob/master/index.js#L72
Requiring external module babel-register
../node_modules/postcss-sassy-import/index.js:72
opts.loadPaths = [...defaultLoadPaths, ...paths];
^
TypeError: paths[Symbol.iterator] is not a function
моя задача gulp
var plugins = [
sassyImport({loadPaths: origin => path.join(process.cwd(), "/app/styles")}),
cssnext({browsers: ['last 2 version']}),
postcssmedia(),
];
gulp.task('styles', () => (
gulp.src('app/styles/app.sss')
.pipe(postcss(plugins, { parser: sugarss }))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist/assets/styles'))
));
Ответ №1:
{loadPaths: origin => path.join(process.cwd(), "/app/styles")}
должно быть
{loadPaths: [origin => path.join(process.cwd(), "/app/styles")]}
loadPaths
должен быть массив.