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

Support for webpackPrefetch and webpackPreload #1150

Closed
jomaxx opened this issue Jan 28, 2019 · 4 comments
Closed

Support for webpackPrefetch and webpackPreload #1150

jomaxx opened this issue Jan 28, 2019 · 4 comments
Labels

Comments

@jomaxx
Copy link

jomaxx commented Jan 28, 2019

Is your feature request related to a problem? Please describe.
Hello, not a problem but a useful enhancement. Webpack has support for preloading and prefetching via magic comments. Currently html-webpack-plugin doesn't make any use of this.

Describe the solution you'd like
Add preloaded and prefetched bundles to the final html output.

Describe alternatives you've considered
The alternative is to do this as a post-build step.

Additional context
https://webpack.js.org/api/module-methods/#magic-comments

@jantimon
Copy link
Owner

jantimon commented Feb 4, 2019

I really like this idea and we almost integrated this feature.
Unfortunately the only way to access information about magic comments is using the api of webpack stats which is very slow and will slow down the compilation for everyone who does not require prefetch or preload tags.

If we can find a better solution I would be very happy to merge a pull request

@MIreland
Copy link

Would it make sense to have it available as a disabled-by-default option, so that those of us who would benefit from it could enable it on production builds?

@jantimon
Copy link
Owner

jantimon commented Apr 17, 2019

Great approach 👍

We have something very similar for html minification

@stale
Copy link

stale bot commented Oct 14, 2019

This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days.

@stale stale bot added the wontfix label Oct 14, 2019
@stale stale bot closed this as completed Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 28, 2019
@jantimon jantimon unpinned this issue Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants