webpack-node-externals icon indicating copy to clipboard operation
webpack-node-externals copied to clipboard

css files from node_modules are still being included

Open pastelsky opened this issue 8 years ago • 3 comments

I'm using this plugin as such:

externals: [
      nodeExternals(),
    ],

In one of my sass files, I do

@import '~normalize/normalize.css'

The generated server bundle still contains the entire normalize.css as a string.

pastelsky avatar Jan 17 '17 08:01 pastelsky

Are you using the ignorePlugin by any chance?? Will need the full webpack.config to be able to provide better insight. new webpack.IgnorePlugin(/\.(css|less)$/)

fadeenk avatar May 10 '17 00:05 fadeenk

sass-loader just compiles your sass through node-sass. You can see it here

Which result you does expect? You need to compile sass but normalize should stay as import statement? It looks weird.

Crazymax11 avatar Mar 08 '18 13:03 Crazymax11

https://www.npmjs.com/package/webpack-node-externals#how-can-i-bundle-required-assets-ie-css-files-from-node_modules

jancama2 avatar Apr 08 '20 08:04 jancama2