diff --git a/README.md b/README.md index 8f38e73c7d1..9391ab4e470 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,6 @@ Some features are currently **not supported**: * Server rendering. * Some experimental syntax extensions (e.g. decorators). -* CSS Modules. * Importing LESS or Sass directly ([but you still can use them](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)). * Hot reloading of components. diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 3ef1104a177..8752d4d07d3 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -32,6 +32,26 @@ 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 = { + // Necessary for external CSS imports to work + // https://github.com/facebookincubator/create-react-app/issues/2677 + ident: 'postcss', + 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. @@ -129,6 +149,7 @@ module.exports = { // It's important to do this before Babel processes the JS. { test: /\.(js|jsx)$/, + exclude: /\/src\/local_modules\//, enforce: 'pre', use: [ { @@ -185,8 +206,10 @@ module.exports = { // "style" loader turns CSS into JS modules that inject