报错信息如下
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://vue-loader.vuejs.org/migrating.html#a-plugin-is-now-required
解决办法如下
// webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
// ...
plugins: [
new VueLoaderPlugin()
]
}
本文介绍了如何解决Vue项目中出现的ModuleError错误,该错误提示未正确配置VueLoaderPlugin。文章详细解释了此问题的原因,并提供了具体的解决方案,包括在webpack配置文件中引入并使用VueLoaderPlugin。
3107

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



