File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -343,23 +343,25 @@ module.exports = {
343
343
};
344
344
```
345
345
346
- #### Disable extracting css from async chunks
346
+ #### Disable Extracting Specified CSS from Chunks
347
347
348
- You may disable extracting css from async chunks with ` disableAsync ` option.
348
+ You may disable extracting css from all chunks with ` disableExtract ` option.
349
349
350
350
``` javascript
351
351
const miniCssExtractPlugin = new MiniCssExtractPlugin ({
352
- disableAsync : true ,
352
+ disableExtract : true ,
353
353
});
354
354
```
355
355
356
- You may also disable extracting async css modules programmatically by passing a function.
356
+ You may also disable extracting css modules programmatically by passing a function.
357
357
358
358
``` javascript
359
359
const miniCssExtractPlugin = new MiniCssExtractPlugin ({
360
- disableAsync ({ module }) {
360
+ disableExtract ({ module , isAsync }) {
361
361
// Do whatever you want. Disable by content size for example:
362
- return module .content .length < 10 * 1024 ;
362
+ // return module.content.length < 10 * 1024;
363
+ // Or disable extracting from all async chunks
364
+ return isAsync;
363
365
},
364
366
});
365
367
```
You can’t perform that action at this time.
0 commit comments