brunocodutra / webapp-webpack-plugin

[DEPRECATED] use favicons-webpack-plugin instead
https://www.npmjs.com/package/webapp-webpack-plugin
MIT License
125 stars 17 forks source link

Support xhtml flag #160

Open Truplic opened 5 years ago

Truplic commented 5 years ago

It seems that webapp-webpack-plugin doesn't consider xhtml flag set in html-webpack-plugin. This is very important for xhtml pages that need to have all tags closed.

devlegacy commented 5 years ago

An options is alter the result before emit, with the hook: https://github.com/brunocodutra/webapp-webpack-plugin#webappwebpackpluginbeforeemit

And close the tags if you need it

brunocodutra commented 5 years ago

@Truplic Thanks for bringing this to my attention - so the expected behavior is that </link> and </meta> are added to the tags injected in the .html file, but are not visible to hooks or the loader?

Meanwhile it seems to me the approach proposed by @devlegacy would support your use case with relatively little effort.

Truplic commented 5 years ago

@devlegacy Thanks for the suggestion. I was able to edit the string markup in the hook. Nevertheless, it would be more elegant to let the html-webpack-plugin do that job as it is configured.