vbenjs / vite-plugin-html

A vite plugin for processing html. It is developed based on lodash template
MIT License
570 stars 93 forks source link

vite build deletes the template #82

Open iongion opened 2 years ago

iongion commented 2 years ago

The template file gets deleted when using vite build

olexanderoff commented 2 years ago

+ same problem

vite@2.9.9 vite-plugin-html@3.2.0

micahlt commented 2 years ago

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

Muritavo commented 8 months ago

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"