diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index adf92f5b124..48594909750 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -32,6 +32,24 @@ const publicUrl = ''; // Get environment variables to inject into our app. const env = getClientEnvironment(publicUrl); +// Options for PostCSS as we reference these options twice +// Adds vendor prefixing to support IE9 and above +const postCSSLoaderOptions = { + ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options + plugins: () => [ + require('postcss-flexbugs-fixes'), + autoprefixer({ + browsers: [ + '>1%', + 'last 4 versions', + 'Firefox ESR', + 'not ie < 9', // React doesn't support IE8 anyway + ], + flexbox: 'no-2009', + }), + ], +} + // This is the development configuration. // It is focused on developer experience and fast rebuilds. // The production configuration is different and lives in a separate file. @@ -204,8 +222,9 @@ module.exports = { // "style" loader turns CSS into JS modules that inject