vue-cli3 下 the template compiler is not available 解决方法

发布于 2019-06-14 15:09:00

问题是在cli3 新建项目后,安装并使用vue-router 出现。

完整的错误提示:

You are using the runtime-only build of Vue where the template compiler is not available

解决方法:对

方法1 :

import Vue from 'vue'  改成 import Vue from 'vue/dist/vue.js''

方法2:

使用vue-ui 重新建立项目,同时把vue-router依赖安装上,这样就不用像方法1那样写这么长了。

0 条评论

发布
问题