-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading to babel 7 - Take II (#5151)
* Bumping package versions to Babel 7 and required dependency versions. * Adapting preset/plugin names. * Using correct import scope for Spinner in OutputList. * Fixing Jest for Babel 7 in Plugins. Due to a change in Babel 7 that affects resolution of babel configs[1] (`.babelrc` is now a hierarchical config, while `babel.config.js` is not), source files outside of the source root of jest will not be transpiled. That means, plugins running tests were not able to require/import source files of core. With this change, `.babelrc` will be renamed to `babel.config.js`, so it is still used when a plugin imports a file from core. [1]: jestjs/jest#6053 (comment) * Generating cjs modules to enable default-less requires of modules. * Updating yarn.lock.
- Loading branch information
1 parent
6fb381e
commit fce7366
Showing
9 changed files
with
1,079 additions
and
5,935 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
presets: [['@babel/env', { modules: 'cjs' }], '@babel/react', '@babel/flow'], | ||
plugins: [ | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-proposal-class-properties', | ||
'add-module-exports', | ||
], | ||
env: { | ||
test: { | ||
plugins: ['babel-plugin-dynamic-import-node'], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"presets": ["env", "stage-0"], | ||
"presets": ["@babel/env"], | ||
"plugins": ["add-module-exports"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.