Skip to content

Commit

Permalink
docs: add example for experimentalUseImportModule (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan committed Apr 17, 2021
1 parent b50224e commit aff99fa
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -267,6 +267,28 @@ When combined with `experiments.layers`, this adds a `layer` option to the loade

You need to have at least webpack 5.33.2.

**webpack.config.js**

```js
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
plugins: [
new MiniCssExtractPlugin({
experimentalUseImportModule: true,
}),
],
module: {
rules: [
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
],
},
};
```

### Loader Options

| Name | Type | Default | Description |
Expand Down

0 comments on commit aff99fa

Please sign in to comment.