-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: only run build-html plugin on bundler inputs (closes #4067) #5342
Conversation
}, | ||
|
||
async transform(html, id) { | ||
if (id.endsWith('.html')) { | ||
if (inputFiles.has(id)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so. in case there's already a plugin, it won't be added to the "bundler inputs"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean. Is it not safe to use the list of inputs in buildStart
as the list of inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty good. thanks!
Rebased |
Seems something failed hard on windows 🤔 |
@Shinigami92 Looks like that worked. Thanks for the tip! |
@dimfeld can i help somehow? |
Don’t know, I thought this was all ready to merge so not sure why nobody has merged it. I guess some other PR had caused a conflict since this was approved so I can fix that later this week… |
Ok, merge conflicts fixed! |
@yyx990803 can we merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…#4067) (vitejs#5342)" This reverts commit 7541a8d.
This reverts commit 7541a8d.
Description
As described in #4067, the build-html plugin runs on any file whose name ends in
.html
. This causes issues when using something likerollup-plugin-string
to include HTML files in another way. Also see #5332 for why the?raw
suffix isn't always an option, such as when using glob imports.This PR changes the plugin to only transform the HTML files present in the input arguments to
buildStart
.Closes #4067
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).