Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel 7 preparation: Switch babel config to JS #1348

Merged
merged 1 commit into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
{
"presets": [["env", {
"modules": false,
"targets": {
"node": 6,
"browsers": [
"ie 9",
"ios 9",
"last 2 chrome versions",
"last 2 edge versions",
"last 2 firefox versions",
]
}
}]],
"plugins": [
"./resources/common-js-modules",
"./resources/inline-invariant",
"syntax-async-functions",
"syntax-async-generators",
"transform-class-properties",
"transform-flow-strip-types",
"transform-object-rest-spread",
["transform-es2015-classes", {"loose": true}],
["transform-es2015-destructuring", {"loose": true}],
["transform-es2015-spread", {"loose": true}]
]
"presets": ["./.babelrc.js"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will remove this file after switching to Babel7

}
26 changes: 26 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
"presets": [["env", {
"modules": process.env.BABEL_MODULES ? false : 'commonjs',
"targets": {
"node": 6,
"browsers": [
"ie 9",
"ios 9",
"last 2 chrome versions",
"last 2 edge versions",
"last 2 firefox versions",
]
}
}]],
"plugins": [
"./resources/inline-invariant",
"syntax-async-functions",
"syntax-async-generators",
"transform-class-properties",
"transform-flow-strip-types",
"transform-object-rest-spread",
["transform-es2015-classes", {"loose": true}],
["transform-es2015-destructuring", {"loose": true}],
["transform-es2015-spread", {"loose": true}]
]
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"babel-plugin-syntax-async-functions": "6.13.0",
"babel-plugin-syntax-async-generators": "6.13.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
"babel-plugin-transform-flow-strip-types": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-polyfill": "^6.26.0",
Expand Down
17 changes: 0 additions & 17 deletions resources/common-js-modules.js

This file was deleted.

2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015
babel-runtime "^6.22.0"
babel-template "^6.24.1"

babel-plugin-transform-es2015-modules-commonjs@6.26.0, babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a"
dependencies:
Expand Down