You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -291,8 +291,20 @@ new RemoveEmptyScriptsPlugin({
291
291
]
292
292
})
293
293
```
294
+
294
295
[See the test case](https://github.com/webdiscus/webpack-remove-empty-scripts/blob/master/test/cases/css-entry-with-ignored-hmr/webpack.config.js).
295
296
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
+
296
308
## Testing
297
309
298
310
`npm run test` will run the unit and integration tests.\
0 commit comments