architgarg / html-webpack-injector

Plugin that simplifies injection of chunks into head and body using HtmlWebpackPlugin (with ability to provide async/defer)
29 stars 11 forks source link

`getHeadAndBodyChunks` throws error if chunk is missing `.attributes` #11

Closed fimion closed 2 years ago

fimion commented 3 years ago

I'll be submitting a PR for this shortly.

We have a script tag being injected by "modern mode" of vue-cli-service that embeds a script tag with no attributes and uses innerHTML to set the content of the script tag. because of this, it has no attributes, and will cause getHeadAndBodyChunks to throw an error.