songsiqi / px2rem-postcss

Postcss version of px2rem.
271 stars 49 forks source link

最新版的react里面postcss的plugins已经变成纯对象了,找不到要在哪里正确配置那个方法调用 #34

Open xiezhiyi163 opened 2 years ago

rsh-kendrick commented 2 years ago

{ loader: require.resolve("postcss-loader"), options: { postcssOptions: { ident: "postcss", config: false, plugins: !useTailwind ? [ "postcss-flexbugs-fixes", [ "postcss-preset-env", { autoprefixer: { flexbox: "no-2009", }, stage: 3, }, ], ] : [ "tailwindcss", "postcss-flexbugs-fixes", [ "postcss-preset-env", { autoprefixer: { flexbox: "no-2009", }, stage: 3, }, ], ], }, sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment, }, }, 最新react-creat-app使用npm run eject后config里的webpack.config.js配置变成了这样,px2rem方法放哪里都不生效