Vue configuration postcss,dev is normal, but build reports an error

< H2 > error message < / H2 >

.Error processing file: static/css/app.712bea8dd803afc0084e16e3c16e5d53.css
(node:5948) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Option safe was removed. Use parser: require ("postcss-safe-parser")

(node:5948) [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.

< H2 > .postcssrc.js < / H2 >
module.exports = {
    "plugins": {
        "postcss-import": {},
        "postcss-url": {},
        "postcss-aspect-ratio-mini": {},
        "postcss-write-svg": { utf8: false },
        "postcss-cssnext": {},
        "postcss-px-to-viewport": {
            viewportWidth: 750, // 750
            viewportHeight: 1334, // 7501334
            unitPrecision: 3, // `px`
            viewportUnit: "vw", // vw
            selectorBlackList: [".ignore", ".hairlines"], // ,
            minPixelValue: 1, // `1px`
            mediaQuery: false // `px`
        },
        "postcss-viewport-units":{},
        "cssnano": {
            preset: "advanced",
            autoprefixer: false,
            "postcss-zindex": false
        }
    }
}
Apr.09,2021

Option safe was removed. Use parser: require ("postcss-safe-parser")

Menu