From c602224e452079e1ff553f34e18cf30a7aa8ee24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Wed, 5 Aug 2020 13:20:39 -0400 Subject: [PATCH] fix: use default modules option from `preset-env` (#9374) --- packages/babel-preset-react-app/create.js | 2 -- packages/babel-preset-react-app/dependencies.js | 4 ---- 2 files changed, 6 deletions(-) diff --git a/packages/babel-preset-react-app/create.js b/packages/babel-preset-react-app/create.js index 473d0969f4e..7aacc8a23fb 100644 --- a/packages/babel-preset-react-app/create.js +++ b/packages/babel-preset-react-app/create.js @@ -83,8 +83,6 @@ module.exports = function (api, opts, env) { useBuiltIns: 'entry', // Set the corejs version we are using to avoid warnings in console corejs: 3, - // Do not transform modules to CJS - modules: false, // Exclude transforms that make all code slower exclude: ['transform-typeof-symbol'], }, diff --git a/packages/babel-preset-react-app/dependencies.js b/packages/babel-preset-react-app/dependencies.js index 8c3256f15e8..acbd65aea15 100644 --- a/packages/babel-preset-react-app/dependencies.js +++ b/packages/babel-preset-react-app/dependencies.js @@ -74,8 +74,6 @@ module.exports = function (api, opts) { targets: { node: 'current', }, - // Do not transform modules to CJS - modules: false, // Exclude transforms that make all code slower exclude: ['transform-typeof-symbol'], }, @@ -89,8 +87,6 @@ module.exports = function (api, opts) { // Set the corejs version we are using to avoid warnings in console // This will need to change once we upgrade to corejs@3 corejs: 3, - // Do not transform modules to CJS - modules: false, // Exclude transforms that make all code slower exclude: ['transform-typeof-symbol'], },