Skip to content

making it work with webpack compression plugin #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2017

Conversation

digital-flowers
Copy link
Contributor

webpack compression plugin use the phase 'compilation.optimize-assets' so we should use the phase 'compilation.optimize-chunk-assets'

webpack compression plugin use the phase 'compilation.optimize-assets' so we should use the phase 'compilation.optimize-chunk-assets'
@NMFR
Copy link
Owner

NMFR commented Sep 6, 2017

This will solve the problem but i need to check if it does not break with extract-text-webpack-plugin.

Thanks for the PR.

@digital-flowers
Copy link
Contributor Author

i have already test it with the "extract-text-webpack-plugin" anw you are welcome

index.js Outdated
@@ -23,6 +23,7 @@ function OptimizeCssAssetsPlugin(options) {
this.lastCallInstance = new LastCallWebpackPlugin({
assetProcessors: [
{
phase: 'compilation.optimize-chunk-assets',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use LastCallWebpackPlugin.PHASE.OPTIMIZE_CHUNK_ASSETS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this didn't work ! the constant PHASE.OPTIMIZE_CHUNK_ASSETS is in the prototype (object) not in the exports

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless we use LastCallWebpackPlugin.prototype.PHASE.OPTIMIZE_CHUNK_ASSETS

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, i put it in the prototype by mistake.
Use LastCallWebpackPlugin.prototype.PHASE.OPTIMIZE_CHUNK_ASSETS, i will fix it later (with a change in the LastCallWebpackPlugin).

@digital-flowers
Copy link
Contributor Author

ok can you check it now

@NMFR NMFR merged commit 56931ef into NMFR:master Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants