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

html-webpack-plugin 2.x #13

Open
jantimon opened this issue Jan 8, 2016 · 1 comment
Open

html-webpack-plugin 2.x #13

jantimon opened this issue Jan 8, 2016 · 1 comment

Comments

@jantimon
Copy link

jantimon commented Jan 8, 2016

hi @alexpalombaro
I am about to release html-webpack-plugin 2.

It would allow you to alter the html/assets with events:
https://github.com/ampedandwired/html-webpack-plugin/tree/feature/loaders#events

There is also a unit test which shows how you could add an additional javascript from another plugin:
https://github.com/ampedandwired/html-webpack-plugin/blob/feature/loaders/spec/HtmlWebpackPluginSpec.js#L682

do you have time to adapt your plugin for 2.x?

@neutraali
Copy link

I'm having a spot of bother that might be related to this. The README says a bunch of stuff about injecting the Modernizr bundle into HTMLWebpackPlugin, if a compatible version is found. I'm running [email protected] at the moment, and it seems that [email protected] is unable to inject itself into the template file.

If I manually include the bundle at the template file, like so:

<script src="<%= htmlWebpackPlugin.files.modernizr %>">

... It works, but this feels a bit wonky in the sense that I remember the "auto-inject" feature working with earlier versions (html-webpack-plugin@^1.0.0).

Also possibly related: #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants