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\[email protected]@postcss\lib\input.js:130:16)
    at Parser.unknownWord (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\parser.js:563:22)
    at Parser.decl (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\parser.js:235:16)
    at Parser.other (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\parser.js:133:18)
    at Parser.parse (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\parser.js:77:16)
    at parse (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\parse.js:17:12)
    at new LazyResult (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\lazy-result.js:60:16)
    at Processor. (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\processor.js:138:12)
    at Processor.process (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\processor.js:117:23)
    at Function.creator.process (C:\Users\0\Desktop\haha\node_modules\[email protected]@postcss\lib\postcss.js:148:43)
    at OptimizeCssAssetsPlugin.processCss (C:\Users\0\Desktop\haha\node_modules\[email protected]@optimize-css-assets-webpack-plugin\index.js:63:19)
    at Object.processor (C:\Users\0\Desktop\haha\node_modules\[email protected]@optimize-css-assets-webpack-plugin\index.js:29:23)
    at C:\Users\0\Desktop\haha\node_modules\[email protected]@last-call-webpack-plugin\index.js:139:8
    at arrayEach (C:\Users\0\Desktop\haha\node_modules\[email protected]@lodash\_arrayEach.js:15:9)
    at forEach (C:\Users\0\Desktop\haha\node_modules\[email protected]@lodash\forEach.js:38:10)
    at LastCallWebpackPlugin.process (C:\Users\0\Desktop\haha\node_modules\[email protected]@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 }
    // }),

你可能感兴趣的:(vue)