Using extract plugin with IgnorePlugin leads to error
See original GitHub issueI am not completely sure if this is a bug or feature request, but it is not possible now to skip some imported module if extact css plugin is used.
It seems that this plugin uses css-loader
explicitly, so user does not have any way to tell webpack “do not load module bar.css” and trying to do so with IgnorePlugin
leads to exception.
The whole story is here: https://stackoverflow.com/questions/58295539/webpack-how-to-exclude-certain-css-file-from-output
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
IgnorePlugin - webpack
The resourceRegExp parameter passed to IgnorePlugin is not tested against the resolved file names or absolute module names being imported or required, but ......
Read more >How to exclude certain .CSS file from output in Webpack
Solution is to use NormalModuleReplacementPlugin to replace bad file with empty one const MiniCssExtractPlugin ...
Read more >webpack/webpack - Gitter
Hmms, it half-worked with new webpack.IgnorePlugin(/packery/) but the resulting bundle has errors in it because the module can't be found... Simen Brekken.
Read more >Adding a Custom webpack Config - Gatsby
There are many plugins in the Gatsby repo using this API to look to for examples e.g. Sass, ... You don't need to...
Read more >How to use the webpack.NamedModulesPlugin function in ...
https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // You can remove this if you don't use Moment.js: new webpack.IgnorePlugin(/^\.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you! Here is workaround: use replacement to replace
bad_css
withempty.css
I will look on this in near future