Skip to content
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

Fix for multiple compilations/webpack-dev-server #2167

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Conversation

jeffposnick
Copy link
Contributor

R: @philipwalton

Fixes #2158

The nuance about emit getting called multiple times on the same plugin instance was lost in the v5 rewrite. This makes sure that we don't modify the this.config member variable in our emit callback, allowing the callback to work when called multiple times via, e.g., webpack-dev-server.

Copy link
Member

@philipwalton philipwalton left a comment

Choose a reason for hiding this comment

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

👍

@jeffposnick jeffposnick merged commit 1c7a401 into master Aug 5, 2019
@jeffposnick jeffposnick deleted the fix-multi-emit branch August 5, 2019 17:50
@simonsinclair
Copy link

simonsinclair commented Aug 16, 2019

@jeffposnick, thanks for fixing this. Is there any way I can test this change in my project today?

@jeffposnick
Copy link
Contributor Author

We should be cutting a new alpha release next week, but if you need the fix sooner, checking out the https://github.com/GoogleChrome/workbox repo and running npm install && gulp build should give you a local copy of everything.

They you can reference workbox-webpack-plugin from <git-clone-root>/packages/workbox-webpack-plugin inside of your webpack config.

@simonsinclair
Copy link

simonsinclair commented Aug 16, 2019

That worked, thanks! Looking forward to the new alpha when it lands.

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.

[5.0.0-alpha.2] GenerateSW Hot reload error
3 participants