项目中 Unknown error from PostCSS plugin 起不来bug

495 阅读1分钟

Unknown error from PostCSS plugin. Your current PostCSS version is 8.4.23, but autoprefixer uses 5.2.18. Perhaps this is the source of the error below.

npm ls posscss


npm install postcss-preset-env



项目中配置
postcss.config.js 文件


配置内容如下
const postcssPresetEnv = require(`postcss-preset-env`);

module.exports = () => ({
  plugins: [
    postcssPresetEnv({
      stage: 0,
    }),
  ],
});