如题,解决webpack+vue项目报错“You are using the runtime-only build of Vue where the template compiler is not available”
解决方法如下图红框加一个vue的别名,直接引入vue/dist/vue.esm.js:
贴代码,附图:
resolve:{
extensions: ['.js', '.json', '.vue'], //扩展名省略配置
alias:{
//模块别名
vue: "vue/dist/vue.esm.js", //加上这一句
'@':resolve('src'),
}
},