出现You are using the runtime-only build of Vue 解决方法

当遇到'You are using the runtime-only build of Vue where the template compiler is not available'的错误时,问题在于vue-cli3.0之后的配置。解决方法是在项目根目录创建vue.config.js文件,配置runtimeCompiler为true,然后重新编译,即可解决模板无法编译的问题。
摘要由CSDN通过智能技术生成

出现:无法编译组件中的template内容,提示:You are using the runtime-only build of Vue where the template compiler is not available

解决方法:由于vue-cli3.0以后精简了很多文件,其中包括去掉了vue.config.js文件,因此需手动在项目根目录下创建此文件,并配置以下内容:

module.exports = {runtimeCompiler: true},然后重新编译生成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值