File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -291,8 +291,20 @@ new RemoveEmptyScriptsPlugin({
291291 ]
292292})
293293```
294+
294295[ See the test case] ( https://github.com/webdiscus/webpack-remove-empty-scripts/blob/master/test/cases/css-entry-with-ignored-hmr/webpack.config.js ) .
295296
297+
298+ ### Using dynamic CSS imports
299+
300+ For dynamic CSS imports, in addition to using ` RemoveEmptyScriptsPlugin() ` in Webpack config, you must specify ` webpackMode: "eager" ` :
301+
302+ ``` js
303+ import (/* webpackMode: "eager" */ ' ./main.css' );
304+ ```
305+
306+ [ See the test case] ( https://github.com/webdiscus/webpack-remove-empty-scripts/tree/master/test/cases/css-import-dynamic ) .
307+
296308## Testing
297309
298310` npm run test ` will run the unit and integration tests.\
Original file line number Diff line number Diff line change 8080 "terser-webpack-plugin" : " ^5.3.14" ,
8181 "webpack" : " 5.102.1" ,
8282 "webpack-hot-middleware" : " 2.26.1" ,
83- "webpack-manifest-plugin" : " 6 .0.1" ,
83+ "webpack-manifest-plugin" : " 5 .0.1" ,
8484 "webpack-merge" : " 6.0.1" ,
8585 "webpack-remove-empty-scripts" : " file:dist"
8686 },
You can’t perform that action at this time.
0 commit comments