preload-webpack-plugin
preload-webpack-plugin copied to clipboard
Filter assets by initial chunk
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").