vbenjs / vite-plugin-html

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

[疑问] vite 开发模式下,插件不工作? #160

Open baijunjie opened 3 months ago

baijunjie commented 3 months ago

插件配置如下

 createHtmlPlugin({
  minify: false,
  entry: path.resolve(__dirname, 'src/main.js'),
  template: path.resolve(__dirname, 'src/template/index.html'),
}),

由于使用了 template/index.html,所以原本在 root 目录下的 index.html 已经被移除,但是在开发模式下直接找不到入口了?

image

version vite: 5.3.4 vite-plugin-html: 3.2.2