How can I include assets that aren't JS or CSS?
It obviously requires a custom template, but somehow I need to specify that I will need these files so they get added to the list of assets. I think it needs to work the same way favicon does.
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/img/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/img/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/img/touch-icon-ipad-retina.png">
Take a look at the 2.0 branch: https://github.com/ampedandwired/html-webpack-plugin/blob/feature/loaders/examples/html-loader/template.html
How close is this 2.0 branch to being ready? I have a production browserify project that I'm almost done converting to webpack. This is the last piece of the puzzle.
Well - I guess 2.0 is more or less feature complete but might need some further improvements.
If you don't want to use the 2.0 beta of this plugin might help you: https://www.npmjs.com/package/transfer-webpack-plugin
Thanks. I'm trying out your branch. It doesn't seem to be picking up my files automatically, but I can do this and it works. ¯_(ツ)_/¯
<link rel="apple-touch-icon" href="<%= require('./assets/img/touch-icon-iphone.png') %>">
If it doesn't picking up links it might be a bug of the html-loader
I'm after the exact same thing. I'd like to be able to inject images (and possibly even css files) into a template, and then have those assets get built as part of the normal webpack build. I'm not specifically seeing a "2.0" branch. Do you mean the "feature/loaders" branch?
Yeah that's the one.. however it seems like that the extract-text-plugin does not work with child compilations.. so css is not supported by now
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.
Most helpful comment
Thanks. I'm trying out your branch. It doesn't seem to be picking up my files automatically, but I can do this and it works. ¯_(ツ)_/¯