-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Update babel version #2659
Update babel version #2659
Conversation
any motivation for this, except keeping current? |
chrome: '67', | ||
safari: '11.1', | ||
}, | ||
useBuiltIns: 'usage', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useBuiltIns
option configures how @babel/preset-env handles polyfills.
Please see:
safari: '11.1', | ||
}, | ||
useBuiltIns: 'usage', | ||
corejs: 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If useBuiltIns
options is specified, corejs
options should be specified.
3
is corejs version which we use.
Please see:
@@ -0,0 +1,18 @@ | |||
const presets = [ | |||
[ | |||
'@babel/env', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use shorthand name (whole name is @babel/preset-env
).
Please see:
corejs: 3, | ||
}, | ||
], | ||
'@babel/react', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is shorthand name too.
Whole name is @babel/preset-react
.
@@ -88,6 +88,7 @@ | |||
"react-virtualized": "^9.21.1", | |||
"redux": "^4.0.0", | |||
"redux-thunk": "^2.3.0", | |||
"regenerator-runtime": "^0.13.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to install core-js & regenerator-runtime for using polyfill.
Please see:
@@ -68,8 +68,8 @@ | |||
"@material-ui/core": "^4.1.1", | |||
"@material-ui/pickers": "^3.1.1", | |||
"@material-ui/styles": "^4.1.1", | |||
"babel-polyfill": "^6.26.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@babel/polyfill
(babel-polyfill
) is deprecated.
Please see the top of this page (https://babeljs.io/docs/en/babel-polyfill)
@@ -18,8 +18,6 @@ import App from './components/App'; | |||
|
|||
import '../scss/main.scss'; | |||
|
|||
require('babel-polyfill'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need import polyfill modules anymore.
Babel will do it automatically.
Keeping current is main motivation. |
messages like this from travis
|
I changed the babel config file from I tried to test with |
also you can delete cache in travis ui
…On Sun, Jul 14, 2019, 10:32 AM tacigar ***@***.***> wrote:
I changed the babel config file from .baberc to babel.config.js.
But Jest did not read the new config file due to cache...
I tried to test with --ci option.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2659?email_source=notifications&email_token=AAAPVVZDX5FFQ7P7RG2O5TLP7J6Z7A5CNFSM4ICYUX72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ34KVI#issuecomment-511165781>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAPVV6QH7FYLM2MMZMGXDTP7J6Z7ANCNFSM4ICYUX7Q>
.
|
Ah, I see.
The reason why log is ERROR is the spec of |
"@fortawesome/fontawesome-free": "^5.4.1", | ||
"babel-core": "^6.26.3", | ||
"babel-core": "^7.0.0-bridge.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package is necessary.
↓ Jest 23.6's document
https://github.com/facebook/jest/blob/770799779fc853ab6285727e8938efd06e694d5f/README.md#using-babel
PTAL 🙇 |
thank you! |
Update babel version to babel 7.