Gulp-sass: How build @import '~normalize-css/normalize.css' in the node_modules dependencies

Created on 12 Sep 2019  路  2Comments  路  Source: dlmanning/gulp-sass

main.scss

@import '~normalize-css/normalize.css'

// ..

Build:
main.css

// not normalize.css content.
...

How to do!

like webpack it can build, see

Most helpful comment

@PolanZ Try this instead:

In your Gulp file:

[...]
.pipe(sass({
  includePaths: ['node_modules']
})
[...]

In your SCSS file:

@import "normalize.css/normalize";

All 2 comments

@PolanZ Try this instead:

In your Gulp file:

[...]
.pipe(sass({
  includePaths: ['node_modules']
})
[...]

In your SCSS file:

@import "normalize.css/normalize";

@matthewmcvickar thx!

I know the this way, But at the same time use webpack. So
I use the node-sass-package-importer plugin solved it.

Was this page helpful?
0 / 5 - 0 ratings