From 1430d1c923bfc7a17cd70d6f62fdf459baff42b3 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 26 Jun 2017 17:35:18 +0100 Subject: [PATCH] Use Babel compact mode in production (#2389) --- packages/react-scripts/config/webpack.config.prod.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 01fe965284c..629904297bc 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -186,12 +186,13 @@ module.exports = { test: /\.(js|jsx)$/, include: paths.appSrc, loader: require.resolve('babel-loader'), - // @remove-on-eject-begin options: { + // @remove-on-eject-begin babelrc: false, presets: [require.resolve('babel-preset-react-app')], + // @remove-on-eject-end + compact: true, }, - // @remove-on-eject-end }, // The notation here is somewhat confusing. // "postcss" loader applies autoprefixer to our CSS.