mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Upgrade to Babel 7 (#6942)
Babel 7 moved to a new configuration format, and they've scoped all of their packages under `@babel/`. This brings MetaMask in-line with dependencies we use that _already_ use Babel 7, and it eliminates a few unfortunate edge cases that can prevent dependencies from being correctly transpiled.
This commit is contained in:
parent
a6d4725e5c
commit
6a0dbcdb31
21
.babelrc
21
.babelrc
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"presets": [
|
|
||||||
[
|
|
||||||
"env",
|
|
||||||
{
|
|
||||||
"targets": {
|
|
||||||
"browsers": [
|
|
||||||
"chrome >= 58",
|
|
||||||
"firefox >= 60"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"react"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"transform-runtime",
|
|
||||||
"transform-class-properties",
|
|
||||||
"transform-object-rest-spread"
|
|
||||||
]
|
|
||||||
}
|
|
24
babel.config.js
Normal file
24
babel.config.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
module.exports = function (api) {
|
||||||
|
api.cache(false)
|
||||||
|
return {
|
||||||
|
presets: [
|
||||||
|
[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
targets: {
|
||||||
|
browsers: [
|
||||||
|
'chrome >= 58',
|
||||||
|
'firefox >= 60',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@babel/preset-react',
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
'@babel/plugin-transform-runtime',
|
||||||
|
'@babel/plugin-proposal-class-properties',
|
||||||
|
'@babel/plugin-proposal-object-rest-spread',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
20
package.json
20
package.json
@ -46,13 +46,13 @@
|
|||||||
"rollback": "./development/rollback.sh"
|
"rollback": "./development/rollback.sh"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.5.5",
|
||||||
"@material-ui/core": "1.0.0",
|
"@material-ui/core": "1.0.0",
|
||||||
"@sentry/browser": "^4.1.1",
|
"@sentry/browser": "^4.1.1",
|
||||||
"@zxing/library": "^0.8.0",
|
"@zxing/library": "^0.8.0",
|
||||||
"abi-decoder": "^1.2.0",
|
"abi-decoder": "^1.2.0",
|
||||||
"asmcrypto.js": "^2.3.2",
|
"asmcrypto.js": "^2.3.2",
|
||||||
"await-semaphore": "^0.1.1",
|
"await-semaphore": "^0.1.1",
|
||||||
"babel-runtime": "^6.23.0",
|
|
||||||
"bignumber.js": "^4.1.0",
|
"bignumber.js": "^4.1.0",
|
||||||
"bip39": "^2.2.0",
|
"bip39": "^2.2.0",
|
||||||
"bluebird": "^3.5.0",
|
"bluebird": "^3.5.0",
|
||||||
@ -166,21 +166,21 @@
|
|||||||
"xtend": "^4.0.1"
|
"xtend": "^4.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.5.5",
|
||||||
|
"@babel/plugin-proposal-class-properties": "^7.5.5",
|
||||||
|
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
|
||||||
|
"@babel/plugin-transform-runtime": "^7.5.5",
|
||||||
|
"@babel/preset-env": "^7.5.5",
|
||||||
|
"@babel/preset-react": "^7.0.0",
|
||||||
|
"@babel/register": "^7.5.5",
|
||||||
"@sentry/cli": "^1.30.3",
|
"@sentry/cli": "^1.30.3",
|
||||||
"@storybook/addon-info": "^5.1.1",
|
"@storybook/addon-info": "^5.1.1",
|
||||||
"@storybook/addon-knobs": "^3.4.2",
|
"@storybook/addon-knobs": "^3.4.2",
|
||||||
"@storybook/react": "^5.1.1",
|
"@storybook/react": "^5.1.1",
|
||||||
"abortcontroller-polyfill": "^1.3.0",
|
"abortcontroller-polyfill": "^1.3.0",
|
||||||
"addons-linter": "^1.10.0",
|
"addons-linter": "^1.10.0",
|
||||||
"babel-core": "^6.26.3",
|
"babel-eslint": "^10.0.2",
|
||||||
"babel-eslint": "^8.0.0",
|
"babelify": "^10.0.0",
|
||||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.22.0",
|
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
|
||||||
"babel-preset-env": "^1.7.0",
|
|
||||||
"babel-preset-react": "^6.24.1",
|
|
||||||
"babel-register": "^6.7.2",
|
|
||||||
"babelify": "^8.0.0",
|
|
||||||
"brfs": "^1.6.1",
|
"brfs": "^1.6.1",
|
||||||
"browserify": "^16.2.3",
|
"browserify": "^16.2.3",
|
||||||
"chai": "^4.1.0",
|
"chai": "^4.1.0",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
require('babel-register')({
|
require('@babel/register')({
|
||||||
ignore: name => name.includes('node_modules') && !name.includes('obs-store'),
|
ignore: [name => name.includes('node_modules') && !name.includes('obs-store')],
|
||||||
})
|
})
|
||||||
|
|
||||||
require('./helper')
|
require('./helper')
|
||||||
|
Loading…
Reference in New Issue
Block a user