报错提示
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! meetwebpack@1.0.0 build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the meetwebpack@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
1、需要安装vue-loader和vue-template-compiler
npm install
--save-dev vue-loader vue-template-compiler
2、vue-loader14以上的版本需要安装一个插件(此部分在vue官网→生态系统→工具→vue-loader→导航栏中的“如何从v14迁移”)
// webpack.config.js
const { VueLoaderPlugin } = require('vue-loader')
module.exports = {
// ...
plugins: [
new VueLoaderPlugin()
]
}