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
Multiple bundles #1
Comments
You can always access the underlying webpack stats object via The I can see how exposing the all the assets as an array might be useful though. Will put some thought into how it could be handled. |
👍 |
The pull request #14 adds all ExtractTextPlugins to the head element |
Closing this now that #14 is merged. All generated css is now included in the default index.html, and details of the css files (per chunk and globally) are available in the |
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. |
I have a use case where I'm using the
ExtractTextPlugin
for generating a css file. In this case there's an extra bundle generated for the same chunk (one js file and one css file).Looking at the code I see that you're just taking the first element when the chunk is an array, but with my use case I would need to get access to the second item which is the
css
file.The ideal option here would be to get the specific item from the array by specifying the index in the template, like this:
{%=o.htmlWebpackPlugin.assets.styles[1]%}
and fallback to the first item when not specifying an index.With the current codebase this doesn't seem doable, as you just pass the data structure to the template engine.
Any thoughts? For my own use I just changed it so you always need to specify the index when the chunk is an array, but this won't work when switching back and forth between building with and without source maps.
The text was updated successfully, but these errors were encountered: