【发布时间】:2021-07-23 14:57:18
【问题描述】:
我有一个 Vue2 的 Vite 项目,它包含一个静态 html 文件。
喜欢关注
import template from 'editor.html';
export default {
template: template
}
当我运行yarn dev时,终端输出:
node_modules/@gaoding/editor-framework/lib/base/editor.js:23:21:错误:没有为“.html”文件配置加载器:node_modules/@gaoding/editor-framework/lib/base/编辑器.html 23│从'./editor.html'导入模板;
我尝试在vite.config.ts下面添加一些插件,但是所有这些都不起作用。
@rollup/plugin-html
汇总插件-html
rollup-plugin-htmlvue
我该如何解决这个问题。
【问题讨论】:
标签: html plugins loader rollup vite