1異常
Module build failed (from ./node_modules/vue-loader/index.js):
TypeError: Cannot read property 'vue' of undefined
參考https://my.oschina.net/u/1033181/blog/2253646
升級vue-loader
npm install vue-loader@latest
2異常vue-loader升級后
Module Error (from ./node_modules/vue-loader/lib/index.js):
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
參考https://www.cnblogs.com/planetwithpig/p/11904159.html
在Vue項目build里webpack.base.conf.js添加相關代碼

const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
plugins: [
new VueLoaderPlugin()
]
}

本文介绍了如何解决使用Vue-loader过程中遇到的两个常见错误:无法读取属性'vue'及升级后缺少对应插件的问题。提供了具体的解决方案,包括升级vue-loader到最新版本及在webpack配置中加入VueLoaderPlugin。
1433

被折叠的 条评论
为什么被折叠?



