vue报错

//报错如下

\ building for production...Error processing file: static/css/app.e8b75d3d19abc5bbbd9bd916f459f0d0.css

(node:16424) UnhandledPromiseRejectionWarning: CssSyntaxError: E:\simou\static\css\app.e8b75d3d19abc5bbbd9bd916f459f0d0.css:1995:6: Unknown word

    at Input.error (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\input.js:130:16)

    at Parser.unknownWord (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\parser.js:563:22)

    at Parser.decl (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\parser.js:235:16)

    at Parser.other (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\parser.js:133:18)

    at Parser.parse (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\parser.js:77:16)

    at parse (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\parse.js:17:12)

    at new LazyResult (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\lazy-result.js:60:16)

    at Processor.<anonymous> (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\processor.js:138:12)

    at Processor.process (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\processor.js:117:23)

    at Function.creator.process (E:\simou\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\postcss.js:148:43)

    at OptimizeCssAssetsPlugin.processCss (E:\simou\node_modules\optimize-css-assets-webpack-plugin\index.js:63:19)

    at Object.processor (E:\simou\node_modules\optimize-css-assets-webpack-plugin\index.js:29:23)

    at E:\simou\node_modules\last-call-webpack-plugin\index.js:139:8

    at arrayEach (E:\simou\node_modules\lodash\_arrayEach.js:15:9)

    at forEach (E:\simou\node_modules\lodash\forEach.js:38:10)

    at LastCallWebpackPlugin.process (E:\simou\node_modules\last-call-webpack-plugin\index.js:136:3)

(node:16424) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

(node:16424) [DEP0018] DeprecationWarning: 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.

首先想到的是插件不兼容 因为项目需求需要使用海康威视的插件;

想到就干,在index.html和main.js中注释掉相关插件继续打包,并没有得到解决;

后面继续查看错误报告,指出都是生成css与js的问题,那么排查的方向就转向webpack;

最后在webpack.prod.conf.js中注释了:

const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')

new OptimizeCSSPlugin({

      cssProcessorOptions: config.build.productionSourceMap

        ? { safe: true, map: { inline: false } }

        : { safe: true }

    }),

应该是压缩提取出的css和js,重复压缩???还是多个文件压缩到同一文件???/

不太清楚,记录下来,哪位大神看到希望给些意见

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值