jaketrent / html-webpack-template

a better default template for html-webpack-plugin
MIT License
830 stars 139 forks source link

FYI: Not compatible with HtmlWebpackInlineChunkPlugin #48

Closed dylan-kerr closed 7 years ago

dylan-kerr commented 7 years ago

I've been attempting to use https://www.npmjs.com/package/html-webpack-inline-chunk-plugin to inline the webpack runtime, and was finding that the changes made by that plugin were not being persisted into the generated HTML.

Some debugging identified that the modification of script tags during the html-webpack-plugin-alter-asset-tags event is only relevant when using HtmlWebpackPlugin's native script tag injection, which is necessarily disabled for the use of this template.

I'm not blaming anyone or suggesting a change, I just wanted to document this publicly to maybe save some future head-scratching. The workaround is to use https://www.npmjs.com/package/inline-manifest-webpack-plugin as suggested by this template's README.

jaketrent commented 7 years ago

Closing as a nice hint for future devs working on similar things. Thanks for the hint.