vite-plugin-html icon indicating copy to clipboard operation
vite-plugin-html copied to clipboard

vite build deletes the template

Open iongion opened this issue 3 years ago • 3 comments

The template file gets deleted when using vite build

iongion avatar Jun 23 '22 09:06 iongion

+ same problem

[email protected] [email protected]

olexanderoff avatar Jul 05 '22 11:07 olexanderoff

This is pretty critical... using this plugin is now impossible.

micahlt avatar Jul 21 '22 14:07 micahlt

For someone that ends up on this issue...

It seems that there is a problem with absolute URLs... It looks like it doesn't delete the files if the path is relative.

So instead of:

template: resolve(__dirname, "path", "to", "index.html")

use a relative path

template: "path/to/index.html"

Muritavo avatar Nov 23 '23 06:11 Muritavo