px2rem-postcss
px2rem-postcss copied to clipboard
最新版的react里面postcss的plugins已经变成纯对象了,找不到要在哪里正确配置那个方法调用
{ 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方法放哪里都不生效