Answer the question
In order to leave comments, you need to log in
How to pass sourcemap from one file to another?
Good day.
When updating my gulpfile, I ran into the following problem:
1 task collects all scss files from a folder into one, the ` gulp-concat ` plugin
const concatBlocks = () =>
src(`${paths.blocks}**/*.scss`)
.pipe(sourcemaps.init())
.pipe(concat('_blocks.scss'))
.pipe(sourcemaps.write())
.pipe(dest(`${paths.scss.src}helpers/`));
const buildCss = () =>
src(['*.scss', '!_*.scss', 'helpers/*.scss', '!helpers/_*.scss'], {cwd: paths.scss.src})
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(scss().on('error', scss.logError))
.pipe(sourcemaps.write('./maps'))
.pipe(dest(`${paths.scss.built}`));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question