fix: multi-page different usage of filename
and template
#127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I am currently trying Multi-Entrypoints with multi Page templates.
Unfortunately I found that something is difficult to get running. After I had it then however, I had to determine... That certain things in the Plugin are not correctly assigned.
This is about the two properties
template
andfilename
. According to the code there seems to be inconsistencies. When and where thetemplate
orfilename
is accessed, is somewhat inconsistent.I have expanded the places in this PR, but somehow there seems to be an inconsistency in it.
vite-plugin-html/packages/core/src/htmlPlugin.ts
Lines 297 to 299 in 841d4ef
vite-plugin-html/packages/core/src/htmlPlugin.ts
Lines 322 to 346 in 841d4ef
What is this? If I replace the
template
there withfilename
, this then works and copies the HTML files to the root level, where folder structure is needed.vite-plugin-html/packages/core/src/htmlPlugin.ts
Lines 120 to 164 in 841d4ef
My Example:
Config
closeBundle
is not adjusted, I get now the output in the build, unfortunately I do not know how to remove thesrc
path in the generated files. (Background: Everything that is programmed is in thesrc
folder).