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

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

Closed
dermoumi opened this issue Nov 12, 2020 · 4 comments · Fixed by #2675
Closed

Comments

@dermoumi
Copy link

Library Affected:
workbox-webpack-plugin 6.0.0-alpha.3

Browser & Platform:
Node JS

Issue or Feature Request Description:
When upgrading to @next, I noticed that the index.html generated by html-webpack-plugin is no longer included in the manifest entries list. This issue disappeared when I rolled back to 5.1.4 :)

I made a minimal repo demonstrating the problem here: https://github.com/dermoumi/workbox-inject-manifest

Hopefully this can help, keep up the good work guys!

@dermoumi dermoumi changed the title InjectManifest does not include index.html generated by html-webpack-plugin in InjectManifest does not include index.html generated by html-webpack-plugin in 6.0.0-alpha.3 Nov 12, 2020
@dermoumi
Copy link
Author

Changing stage to PROCESS_ASSETS_STAGE_ANALYSE in https://github.com/GoogleChrome/workbox/blob/v6/packages/workbox-webpack-plugin/src/inject-manifest.js#L172 seems to fix the issue.

Looked into it on html-webpack-plugin's end, but it seems changing the stage there causes some extra issues: https://github.com/jantimon/html-webpack-plugin/blob/next/index.js#L211-L217

But then I'm not familiar with webpack plugins API nor do I know the implications of doing this. I'll push a PR anyway if it helps ._.

@jeffposnick
Copy link
Contributor

Thanks for investigating and reporting this issue! I know that @jantimon has been actively working with the webpack core team to find the "right" time to run various plugins so that they all are properly ordered.

Can you just confirm which version of html-webpack-plugin you saw this behavior with? I want to make sure that we're testing against the same thing in our test suite.

What I'd like to do before switching to PROCESS_ASSETS_STAGE_ANALYSE is get some feedback from the webpack core team, as PROCESS_ASSETS_STAGE_SUMMARIZE is explicitly documented as the stage to use when generating an asset manifest for a service worker.

@dermoumi
Copy link
Author

I can reproduce using html-webpack-plugin versions 4.3.0 4.5.0 and 5.0.0-alpha.13

@andyrichardson
Copy link

For anyone else experiencing this issue - the fix only works for html-webpack-plugin versions in range >=5.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants