You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see the writeBundle and generateBundle hooks are called per output, when output is an array. But the index.html file has to be generated only once for all outputs, so it shall have a hook that is called at the very end.
The text was updated successfully, but these errors were encountered:
That is architecturally difficult as plugin hooks are managed by Rollup core, but Rollup core just cannot know how many outputs there will be. It is a problem of the JavaScript API that allows to create an infinite amount of outputs per bundle. So there will be no easy solution. Technically each bundle creates its own directory anyway so the file would live outside the bundling process anyway.
You could try some trickery by using output plugins: If you give each output you want to include a specific output plugin, you could be counting plugin instances and create the file when the last was created.
With rollup for the same input I generate two outputs: ES and UMD. I want to tweak @rollup/plugin-html to generate a single index.html containg
As far as I can see the writeBundle and generateBundle hooks are called per output, when output is an array. But the index.html file has to be generated only once for all outputs, so it shall have a hook that is called at the very end.
The text was updated successfully, but these errors were encountered: