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()
]
}