出现:无法编译组件中的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},然后重新编译生成。
当遇到'You are using the runtime-only build of Vue where the template compiler is not available'的错误时,问题在于vue-cli3.0之后的配置。解决方法是在项目根目录创建vue.config.js文件,配置runtimeCompiler为true,然后重新编译,即可解决模板无法编译的问题。
出现:无法编译组件中的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},然后重新编译生成。
1620
247
8565
3万+
802
4492
1623
693

被折叠的 条评论
为什么被折叠?