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 and filename. According to the code there seems to be inconsistencies. When and where the template or filename is accessed, is somewhat inconsistent.
I have expanded the places in this PR, but somehow there seems to be an inconsistency in it.
in the build as long as closeBundle is not adjusted, I get now the output in the build, unfortunately I do not know how to remove the src path in the generated files. (Background: Everything that is programmed is in the src folder).
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.
https://github.com/vbenjs/vite-plugin-html/blob/841d4ef04c3cf5ff0d4339350ae336aa83aa70ed/packages/core/src/htmlPlugin.ts#L297-L299
https://github.com/vbenjs/vite-plugin-html/blob/841d4ef04c3cf5ff0d4339350ae336aa83aa70ed/packages/core/src/htmlPlugin.ts#L322-L346
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. https://github.com/vbenjs/vite-plugin-html/blob/841d4ef04c3cf5ff0d4339350ae336aa83aa70ed/packages/core/src/htmlPlugin.ts#L120-L164My 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).