How to keep css sourcemap files extracted with gulp?

26 Views Asked by At

I 'm quite new to gulp. I use gulp version 4. I have 2 scss files: parent.scss and child.scss, and parent scss imports child scss with "@import child ". I compile sourcemaps using usual gulp pipe commands ...parentSource.pipe(sass.sync()).pipe(sourcemaps.init()).pipe(sourcemaps.write())... However, in the chrome developer tools I see in maps folder only one large parent sourcemap file, with contents of both parent and child. I would like to see different sourcemap files for parent and child files, to know in which css file the css snippets are. Is it possible to do that (assuming possibility of multiply-nested @imports as well)? Do not see anything about @import in gulp-sourcemaps documentation.

I found some MiniCssExtractPlugin, but did not see anything mentioning possibility of integration with gulp.

0

There are 0 best solutions below