donnikitos / vite-plugin-html-inject

Split your ViteJS index.html into smaller pieces
https://www.npmjs.com/package/vite-plugin-html-inject
MIT License
58 stars 3 forks source link

Error loading imbricated files when using relative paths #11

Open adazmy opened 9 months ago

adazmy commented 9 months ago

When loading a file that is inside a directory using a relative path, and that file also loads another file with relative path, the resolving of the later is done based on the first load instuction.

File: /root/index.html
<load src="part.html"/>

File: /root/dir/part.html
<load src="file.html"/>

File: /root/dir/file.html
<h1>Title</h1>

Error trying to load /root/file.html

Paths resolve correctly if root based paths are used.

donnikitos commented 9 months ago

Gotcha, thanks for the submission of the bug!

adazmy commented 9 months ago

Good luck and thanks for this awsome plugin! 💯