From 8429c871efd0dd1612b0a2cf414c47eb039f3359 Mon Sep 17 00:00:00 2001 From: Fareed Namrouti Date: Wed, 6 Sep 2017 17:57:29 +0900 Subject: [PATCH 1/3] making it work with webpack compression plugin webpack compression plugin use the phase 'compilation.optimize-assets' so we should use the phase 'compilation.optimize-chunk-assets' --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 002baf7..3e3f4b8 100644 --- a/index.js +++ b/index.js @@ -23,6 +23,7 @@ function OptimizeCssAssetsPlugin(options) { this.lastCallInstance = new LastCallWebpackPlugin({ assetProcessors: [ { + phase: 'compilation.optimize-chunk-assets', regExp: this.options.assetNameRegExp, processor: function (assetName, asset, assets) { return self.processCss(assetName, asset, assets); From 5674c441e58e37fa901ae4150375e34dbd3f3168 Mon Sep 17 00:00:00 2001 From: Fareed Namrouti Date: Wed, 6 Sep 2017 18:31:51 +0900 Subject: [PATCH 2/3] using LastCallWebpackPlugin.PHASE.OPTIMIZE_CHUNK_ASSETS --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3e3f4b8..19a6ff5 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ function OptimizeCssAssetsPlugin(options) { this.lastCallInstance = new LastCallWebpackPlugin({ assetProcessors: [ { - phase: 'compilation.optimize-chunk-assets', + phase: LastCallWebpackPlugin.PHASE.OPTIMIZE_CHUNK_ASSETS, regExp: this.options.assetNameRegExp, processor: function (assetName, asset, assets) { return self.processCss(assetName, asset, assets); From efae16000c70dd67c819786a59b2cd350b4f3b49 Mon Sep 17 00:00:00 2001 From: Fareed Namrouti Date: Wed, 6 Sep 2017 18:44:43 +0900 Subject: [PATCH 3/3] using LastCallWebpackPlugin.prototype.PHASE.OPTIMIZE_CHUNK_ASSETS --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 19a6ff5..fde7e4d 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ function OptimizeCssAssetsPlugin(options) { this.lastCallInstance = new LastCallWebpackPlugin({ assetProcessors: [ { - phase: LastCallWebpackPlugin.PHASE.OPTIMIZE_CHUNK_ASSETS, + phase: LastCallWebpackPlugin.prototype.PHASE.OPTIMIZE_CHUNK_ASSETS, regExp: this.options.assetNameRegExp, processor: function (assetName, asset, assets) { return self.processCss(assetName, asset, assets);