vue template([Vue warn]: You are
2018-10-16 本文已影响0人
arymy
报错内容([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的emplate,不能直接使用npm install之后的vue,需要在webpack里面添加几行代码:
resolve: {
alias: {
'vue': 'vue/dist/vue.js'
}
}
或者
resolve: {
alias: {
vue$: 'vue/dist/vue.common.js' //alias 支持$符号来缩小范围到只命中以关键字结尾的导入语句
}
}