Closed simonbuchan closed 1 year ago
Thanks @simonbuchan for bringing attention for this behaviour, we'll definitely look into that and fix it!
Just released v3.7.4
with multiple html files support.
I hope it works for you as expected. 😉
Works perfectly! Thanks for the quick turnaround, you really saved me some time!
If you have a build that creates multiple html output files then this plugin will only inject the style / css link tag into the last one it sees.
In a real project this happens with a plugin scraping your source files for e.g. a
foo.page.tsx
and generating an entry from a template html file, but you can reproduce the issue with the simple manual config:This is due to the plugin storing only a
indexHtmlContent/Path
intransformIndexHtml()
and updating it ingenerateBundle()
, but this config will fire thetransformIndexHtml()
for every input html file (despite the name) first.