preload-webpack-plugin icon indicating copy to clipboard operation
preload-webpack-plugin copied to clipboard

Add option for entrpoint + preload/prefetch children

Open gcoombe opened this issue 5 years ago • 0 comments

Fixes #108

Description

  • Adds link tags for entrypoints as well as any chunks which are prefetched or preloaded from an entrypoint via a magic comment

Why

  • If we use magic comments to preload bundles from an entrypoint, the bundle will not start loading until the parent as finished (See https://github.com/webpack/webpack/issues/8342#issuecomment-438649676)

TODO

Submitted a PR to get early feedback on the approach but would need to do the following:

  • [ ] Add to README
  • [ ] This requires webpack >= 4.6.0 so we would either need to bump the peer dependency or make it clear that child assets will not be added in an older verions (would prefer the former)

gcoombe avatar Jan 21 '20 06:01 gcoombe