bengsfort / rollup-plugin-generate-html-template

Rollup plugin for automatically injecting a script tag with the final bundle into an html file.
MIT License
60 stars 19 forks source link

Doesn't work with hash/chunking #7

Closed StevenWeathers closed 5 years ago

StevenWeathers commented 5 years ago

Rollup allows hashing/chunking, your plugin only works with the singular static bundle file. Would be nice if it worked with both solutions from Rollup.

bengsfort commented 5 years ago

Can you elaborate? Are you referring to multiple outputting multiple entry that are not dynamically loaded?

StevenWeathers commented 5 years ago

If you use rollups options like below, it throws errors:

{
dest: "somedir",
entryFileNames: "[name]-[hash].js",
chunkFileNames: "[name]-[hash].js"
}
bengsfort commented 5 years ago

Great, thanks! Will check this out tomorrow.

bengsfort commented 5 years ago

This should be fixed with v1.2.0, which should now be published to both NPM and Yarn.