@@ -224,6 +224,7 @@ Possible options:
224
224
- CssMinimizerPlugin.cssoMinify
225
225
- CssMinimizerPlugin.cleanCssMinify
226
226
- CssMinimizerPlugin.esbuildMinify
227
+ - CssMinimizerPlugin.parcelCssMinify
227
228
- ` async (data, inputMap, minimizerOptions) => {return {code: "a{color: red}", map: "...", warnings: [], errors: []}} `
228
229
229
230
> ⚠️ ** Always use ` require ` inside ` minify ` function when ` parallel ` option enabled** .
@@ -485,7 +486,8 @@ module.exports = {
485
486
486
487
``` js
487
488
module .exports = {
488
- devtool: " source-map" ,
489
+ // Uncomment if you need source maps
490
+ // devtool: "source-map",
489
491
optimization: {
490
492
minimize: true ,
491
493
minimizer: [
@@ -505,7 +507,8 @@ module.exports = {
505
507
506
508
``` js
507
509
module .exports = {
508
- devtool: " source-map" ,
510
+ // Uncomment if you need source maps
511
+ // devtool: "source-map",
509
512
optimization: {
510
513
minimize: true ,
511
514
minimizer: [
@@ -525,7 +528,8 @@ module.exports = {
525
528
526
529
``` js
527
530
module .exports = {
528
- devtool: " source-map" ,
531
+ // Uncomment if you need source maps
532
+ // devtool: "source-map",
529
533
optimization: {
530
534
minimize: true ,
531
535
minimizer: [
@@ -537,6 +541,27 @@ module.exports = {
537
541
};
538
542
```
539
543
544
+ ### Using custom minifier [ @parcel/css ] ( https://github.com/parcel-bundler/parcel-css )
545
+
546
+ ** webpack.config.js**
547
+
548
+ ``` js
549
+ module .exports = {
550
+ // Uncomment if you need source maps
551
+ // devtool: "source-map",
552
+ optimization: {
553
+ minimize: true ,
554
+ minimizer: [
555
+ new CssMinimizerPlugin ({
556
+ minify: CssMinimizerPlugin .parcelCssMinify ,
557
+ // Uncomment this line for options
558
+ // minimizerOptions: { targets: { ie: 11 }, drafts: { nesting: true } },
559
+ }),
560
+ ],
561
+ },
562
+ };
563
+ ```
564
+
540
565
## Contributing
541
566
542
567
Please take a moment to read our contributing guidelines if you haven't yet done so.
0 commit comments