Html-webpack-plugin: Pass additional variables into custom template

Created on 9 Apr 2016  路  6Comments  路  Source: jantimon/html-webpack-plugin

My use case is related to closed #31 where @Ciantic wanted to add React script as external asset. I want to do a same, but with custom ThreeJS build. Normally using commons chunk would be just fine, however after I tried to apply UglifyJS, it got broken for some reason. So I need to externalize this and have it served separately.

I am sure that allowing to pass additional variables into template from within webpack configuration might be generally handy for various other cases. Or ideally be more specific and allow specify list of extra scripts that should be added along the compiled assets.

Most helpful comment

Ahh, so whole options object is just accessible from the template? Alright, that should be enough. Thanks!

All 6 comments

That is already possible - you can pass any information just like the title to the template

@jantimon Can you show me some small example? I am not sure how do you mean it.

Ahh, so whole options object is just accessible from the template? Alright, that should be enough. Thanks!

Correct 馃憤

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lonelydatum picture lonelydatum  路  3Comments

ghaiklor picture ghaiklor  路  3Comments

hp8wvvvgnj6asjm7 picture hp8wvvvgnj6asjm7  路  3Comments

yyx990803 picture yyx990803  路  4Comments

amorphius picture amorphius  路  3Comments