vue run build 错误 CssSyntaxError错误

原文链接:https://blog.csdn.net/weixin_44023519/article/details/97103637
vue打包出现的错误,记录一下

错误代码
Error processing file: static/css/app.4ce01a6050060bff9b33c64750b6bd11.css
(node:6544) UnhandledPromiseRejectionWarning: CssSyntaxError: C:\Users\0\Desktop\haha\static\css\app.4ce01a6050060bff9b33c64750b6bd11.css:1758:5: Unknown word
    at Input.error (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\input.js:130:16)
    at Parser.unknownWord (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\parser.js:563:22)
    at Parser.decl (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\parser.js:235:16)
    at Parser.other (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\parser.js:133:18)
    at Parser.parse (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\parser.js:77:16)
    at parse (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\parse.js:17:12)
    at new LazyResult (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\lazy-result.js:60:16)
    at Processor.<anonymous> (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\processor.js:138:12)
    at Processor.process (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\processor.js:117:23)
    at Function.creator.process (C:\Users\0\Desktop\haha\node_modules\_postcss@7.0.17@postcss\lib\postcss.js:148:43)
    at OptimizeCssAssetsPlugin.processCss (C:\Users\0\Desktop\haha\node_modules\_optimize-css-assets-webpack-plugin@3.2.1@optimize-css-assets-webpack-plugin\index.js:63:19)
    at Object.processor (C:\Users\0\Desktop\haha\node_modules\_optimize-css-assets-webpack-plugin@3.2.1@optimize-css-assets-webpack-plugin\index.js:29:23)
    at C:\Users\0\Desktop\haha\node_modules\_last-call-webpack-plugin@2.1.2@last-call-webpack-plugin\index.js:139:8
    at arrayEach (C:\Users\0\Desktop\haha\node_modules\_lodash@4.17.15@lodash\_arrayEach.js:15:9)
    at forEach (C:\Users\0\Desktop\haha\node_modules\_lodash@4.17.15@lodash\forEach.js:38:10)
    at LastCallWebpackPlugin.process (C:\Users\0\Desktop\haha\node_modules\_last-call-webpack-plugin@2.1.2@last-call-webpack-plugin\index.js:136:3)
(node:6544) 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:6544) [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.

记录下 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 }
    // }),
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值