位置:- 正文

Vue 解决报错 You are using the runtime-only build of Vue where the template compiler is not available.(vue错误提示)

编辑:rootadmin
Vue 解决报错 You are using the runtime-only build of Vue where the template compiler is not available.

推荐整理分享Vue 解决报错 You are using the runtime-only build of Vue where the template compiler is not available.(vue错误提示),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:vue遇到的问题和解决方法,vue遇到的问题和解决方法,vue jsx报错,vue错误处理,vue错误提示,vue错误处理,vue运行报错,vue运行报错,内容如对您有帮助,希望把文章链接给更多的朋友!

Vue 解决报错 You are using the runtime-only build of Vue where the template compiler is not available.(vue错误提示)

报错信息

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

您正在使用Vue的仅运行时版本,并而模板编译器不可用。 可以将模板预编译为渲染函数,也可以使用包含编译器的内部版本

在主入口渲染的组件方式不一样,上面这种是采用的 render函数渲染 ,没有进行 runtime-only 配置,所以报错了。

解决方案

在 vue.config.js 中进行配置 runtimeCompiler 为 true 即可。

module.exports = { runtimeCompiler: true,
本文链接地址:https://www.jiuchutong.com/zhishi/298442.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/298443.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络