Vue 报错 [Vue warn]: You are using the runtime-only build of Vue where the templat

575 阅读1分钟

报错信息

[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.

解决方法

修改 package.json 文件,在 json 对象中添加一个属性

"alias": {
    "vue": "./node_modules/vue/dist/vue.common.js"
}