Open xiezhiyi163 opened 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方法放哪里都不生效
{ 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, }, },
{ 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方法放哪里都不生效