如何解决错误:“@parcel/transformer-postcss:PostCSS 配置必须有插件”

koa*_*aok 5 parcel node.js postcss

使用包构建我的项目时出现此错误:

@parcel/transformer-postcss: PostCSS config must have plugins

at load ([projectpath]/node_modules/@parcel/transformer-postcss/lib/loadConfig.js:166:13)
Run Code Online (Sandbox Code Playgroud)

自从我升级包裹后就发生了这种情况。我不太清楚,我应该如何设置插件我尝试在项目上添加 .postcssrc json 文件

(添加在我发出“parcel build ...”的位置,但似乎它没有看到它,因为我收到一条消息,例如:使用 javascript PostCSS 配置文件意味着丢失... 使用 .postcssrc json尽可能归档)

.postcssrc json 文件内容:

{
  "modules": true,
  "plugins": {
    "autoprefixer": {
      "grid": true
    }
  }
}

Run Code Online (Sandbox Code Playgroud)