小编noa*_*lam的帖子

vite无法处理xxx.html文件

我有一个 Vue2 的 Vite 项目,它包含一个静态 html 文件。

\n

喜欢关注

\n
import template from 'editor.html';\nexport default {\n    template: template\n}\n
Run Code Online (Sandbox Code Playgroud)\n

当我运行时yarn dev,终端输出:

\n
\n

node_modules/@gaoding/editor-framework/lib/base/editor.js:23:21:错误:没有为“.html”文件配置加载器:node_modules/@gaoding/editor-framework/lib/base/editor.html \n23 \xe2\x94\x82 从 './editor.html' 导入模板;

\n
\n

我尝试在下面添加一些插件vite.config.ts,但所有这些都不起作用。

\n
\n

@rollup/插件-html

\n
\n
\n

rollup-插件-html

\n
\n
\n

rollup-插件-htmlvue

\n
\n

我怎么解决这个问题。

\n

html plugins rollup loader vite

21
推荐指数
2
解决办法
7316
查看次数

标签 统计

html ×1

loader ×1

plugins ×1

rollup ×1

vite ×1