报错信息:
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
解决
webpage.config.js添加
module.exports = {
//...
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
原因:
var app = new Vue({
el:'#app',
data(){
return {
msg: 'hello vue'
}
}
})
是compiler写法