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

Update webpack stage to catch html-webpack-plugin output #2671

Closed
wants to merge 1 commit into from
Closed

Update webpack stage to catch html-webpack-plugin output #2671

wants to merge 1 commit into from

Conversation

dermoumi
Copy link

R: @jeffposnick @philipwalton

Fixes #2670

Change stage for InjectManifest in workbox-webpack-plugin to account for the output of html-webpack-plugin

Note: having issues running google-chrome-beta, even in headless mode, on a WSL2 environment. But tests up until that point pass with no problems.

@google-cla
Copy link

google-cla bot commented Nov 12, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@dermoumi
Copy link
Author

@googlebot I signed it!

@jeffposnick
Copy link
Contributor

Thanks! I am looking for some clarity in webpack/webpack#11822 (comment) as to whether this is the right change to make.

@jeffposnick jeffposnick self-requested a review November 12, 2020 16:26
@jeffposnick
Copy link
Contributor

Thanks for this contribution—unfortunately, I think PROCESS_ASSETS_STAGE_ANALYSE ends up running our plugin too late, as it happens after, e.g., the CompressionPlugin's generation of a gzip-ed version of the final service worker.

My current tentative plan is switch to PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER - 10 for the stage (i.e. "unofficially" run it right before the stage at which CompressionPlugin will run), but that's likely just a stopgap until the webpack team comes back with advice about a better solution.

(Additionally, the change needs to be made to the generate-sw.js file, and I'd like to update some dependencies to pick up the latest html-webpack-plugin version for our tests.)

Because of all that, I'm going to close this PR, and submit a PR with the changes outlined above instead. I do appreciate you taking the time to investigate the issue and submit some code, though, and I'll make sure to credit you in the release notes!

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.

InjectManifest does not include index.html generated by html-webpack-plugin in 6.0.0-alpha.3
2 participants