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

Filter assets by initial chunk

Open beheh opened this issue 7 years ago • 0 comments

Continuation of #35.

If I have two chunks ("foo" and "bar)" loading one asset using file-loader each ("foo.png" and "bar.png") with an HtmlWebpackPlugin each ("foo.html" and "bar.html"), I want "foo.html" to only preload "foo.png", and "bar.html" to only preload "bar.png".

If I have a third chunk "baz" (using a third HtmlWebpackPlugin "baz.html") which uses file-loader to load both "foo.png" and "bar.png", I want both images to be preloaded in "baz.html".

I assume this could be done by new include option (similar to "allChunks").

beheh avatar Mar 11 '18 01:03 beheh