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

Include ChunkManifest in HTML #600

Closed
jakoblind opened this issue Feb 24, 2017 · 7 comments
Closed

Include ChunkManifest in HTML #600

jakoblind opened this issue Feb 24, 2017 · 7 comments

Comments

@jakoblind
Copy link

When using code splitting for caching as described in this official guide you get a chunk manifest file generated by ChunkManifestPlugin that you should include in the HTML file. It would be nice if html-webpack-plugin could include it automatically.

Is it possible and a good idea? I am willing to help contributing but would need some input on where to start.

@jakoblind
Copy link
Author

Or maybe this should be implemented as a separate plugin?

@jantimon
Copy link
Owner

I really like the idea - could we start with a seperate plugin for now and integrate it as a second step?

@csentis
Copy link

csentis commented Feb 27, 2017

integrating inlining of chunks' mapping into HTML Webpack Plugin sounds very promising, as this would be a trusted one-stop solution.

Nonetheless, there already is a plugin taking care of inlining: https://github.com/jouni-kantola/inline-chunk-manifest-html-webpack-plugin. Works.

@jakoblind
Copy link
Author

@csentis exactly what I was looking for. Thanks! I think we can close this issue then

@jouni-kantola
Copy link
Contributor

After @csentis reached out (jouni-kantola/inline-chunk-manifest-html-webpack-plugin#1), I decided to publish the plugin to npm:
https://www.npmjs.com/package/inline-chunk-manifest-html-webpack-plugin
Thanks for feedback, @csentis!

@jantimon: The plugin is pretty naive, but please have a look at it and see if you find it useful.

@jouni-kantola
Copy link
Contributor

I've now upgraded inline-chunk-manifest-html-webpack-plugin so that the chunk manifest can be inlined with a variable in the template (ex: https://github.com/jouni-kantola/webpack-output-by-build-type/blob/master/tmpl/index.ejs).

I didn't know this option existed until the following issue: jouni-kantola/inline-chunk-manifest-html-webpack-plugin#3.

@lock
Copy link

lock bot commented May 31, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants