我有一个 Vue2 的 Vite 项目,它包含一个静态 html 文件。
\n喜欢关注
\nimport template from 'editor.html';\nexport default {\n template: template\n}\n
Run Code Online (Sandbox Code Playgroud)\n当我运行时yarn dev
,终端输出:
\n\nnode_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
我尝试在下面添加一些插件vite.config.ts
,但所有这些都不起作用。
\n\n@rollup/插件-html
\n
\n\nrollup-插件-html
\n
\n\nrollup-插件-htmlvue
\n
我怎么解决这个问题。
\n