Skip to content

Commit f30c0b2

Browse files
committed
docs: update readme
1 parent cfed58d commit f30c0b2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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.\

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
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
},

0 commit comments

Comments
 (0)