building for production...Error processing file: static/css/app.6458642b188649e4681f7f1161fc212d.css
(node:21652) UnhandledPromiseRejectionWarning: CssSyntaxError: D:\project\project\static\css\app.6458642b188649e4681f7f1161fc212d.css:975:5: Unknown word
at Input.error (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\input.js:130:16)
at Parser.unknownWord (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\parser.js:563:22)
at Parser.other (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\parser.js:133:18)
at Parser.parse (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\parser.js:77:16)
at parse (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\parse.js:17:12)
at new LazyResult (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\lazy-result.js:60:16)
at Processor.<anonymous> (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\processor.js:138:12)
at Processor.process (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\processor.js:117:23)
at Function.creator.process (D:\project\project\node_modules\_postcss@7.0.21@postcss\lib\postcss.js:148:43)
at OptimizeCssAssetsPlugin.processCss (D:\project\project\node_modules\_optimize-css-assets-webpack-plugin@3.2.1@optimize-css-assets-webpack-plugin\index.js:63:19)
at Object.processor (D:\project\project\node_modules\_optimize-css-assets-webpack-plugin@3.2.1@optimize-css-assets-webpack-plugin\index.js:29:23)
at D:\project\project\node_modules\_last-call-webpack-plugin@2.1.2@last-call-webpack-plugin\index.js:139:8
at arrayEach (D:\project\project\node_modules\_lodash@4.17.15@lodash\_arrayEach.js:15:9)
at forEach (D:\project\project\node_modules\_lodash@4.17.15@lodash\forEach.js:38:10)
at LastCallWebpackPlugin.process (D:\project\project\node_modules\_last-call-webpack-plugin@2.1.2@last-call-webpack-plugin\index.js:136:3)
(node:21652) 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:21652) [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.参考大神的修改配置的方法,问题已经解决
方法如下:
build下的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 }
}),
问题解决