vue打包npm run build错误--Unhandled promise rejections are deprecated. In the future, promise rejections

打包前端项目的时候遇到报错

Unhandled promise rejections are deprecated. In the future, 
promise rejections that are not handled will terminate the Node.js 
process with a non-zero exit code.

vue打包npm run build错误--Unhandled promise rejections are deprecated. In the future, promise rejections_第1张图片
在网上找了解决办法:
把webpack.prod.conf.js下列代码进行注释就可以了

    new OptimizeCSSPlugin({
      cssProcessorOptions: config.build.productionSourceMap
        ? { safe: true, map: { inline: false } }
        : { safe: true }
    }),

vue打包npm run build错误--Unhandled promise rejections are deprecated. In the future, promise rejections_第2张图片

你可能感兴趣的:(笔记,vue.js,npm,webpack)