building for production...Error processing file:static/css/***.css。mui错误

记录一个遇到的bug,

| building for production...Error processing file: static/css/app.b18fbc2b7db7cdcfae721c99fa6ea224.css
(node:3552) UnhandledPromiseRejectionWarning: postcss-svgo: Error in parsing SVG: Unquoted attribute value
Line: 0
Column: 14
Char: \
(node:3552) 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:3552) [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.

导致原因是因为mui的css文件里面有两行svg的引号导致的。

 background-image: url("data:image/svg+xml;charset=utf-8,");
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100%;
}

.mui-spinner-white:after
{
    background-image: url("data:image/svg+xml;charset=utf-8,");
}

 以前的代码是单引号,在我把background-image: url改成上引号之后成功解决,记录一下。

你可能感兴趣的:(开发摘录)