Skip to content

Commit aff99fa

Browse files
authored
docs: add example for experimentalUseImportModule (#743)
1 parent b50224e commit aff99fa

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,28 @@ When combined with `experiments.layers`, this adds a `layer` option to the loade
267267

268268
You need to have at least webpack 5.33.2.
269269

270+
**webpack.config.js**
271+
272+
```js
273+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
274+
275+
module.exports = {
276+
plugins: [
277+
new MiniCssExtractPlugin({
278+
experimentalUseImportModule: true,
279+
}),
280+
],
281+
module: {
282+
rules: [
283+
{
284+
test: /\.css$/i,
285+
use: [MiniCssExtractPlugin.loader, 'css-loader'],
286+
},
287+
],
288+
},
289+
};
290+
```
291+
270292
### Loader Options
271293

272294
| Name | Type | Default | Description |

0 commit comments

Comments
 (0)