本文主要是介绍解决webpack+vue项目报错“You are using the runtime-only build of Vue where the template compiler is not av”,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
如题,解决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'),}},
这篇关于解决webpack+vue项目报错“You are using the runtime-only build of Vue where the template compiler is not av”的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!