mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-30 12:18:09 +00:00
Merge pull request #353 from trezor/fix/upgrade-babel
Fix/upgrade babel
This commit is contained in:
commit
3d18be60a5
31
.babelrc
31
.babelrc
@ -1,31 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"useBuiltIns": true,
|
||||
"loose": true
|
||||
}],
|
||||
"react"
|
||||
],
|
||||
"plugins": [
|
||||
"react-hot-loader/babel",
|
||||
"transform-class-properties",
|
||||
"transform-object-rest-spread",
|
||||
"transform-flow-strip-types",
|
||||
["transform-runtime", {
|
||||
"polyfill": false,
|
||||
"regenerator": true
|
||||
}],
|
||||
["module-resolver", {
|
||||
"root": ["./src"],
|
||||
"alias": {
|
||||
"public": ["./public"]
|
||||
}
|
||||
}],
|
||||
"babel-plugin-styled-components"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": ["jest"]
|
||||
}
|
||||
}
|
||||
}
|
51
babel.config.js
Normal file
51
babel.config.js
Normal file
@ -0,0 +1,51 @@
|
||||
module.exports = (api) => {
|
||||
// api.cache.forever();
|
||||
|
||||
const presets = [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'entry',
|
||||
loose: true,
|
||||
},
|
||||
],
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-flow',
|
||||
];
|
||||
|
||||
const plugins = [
|
||||
'react-hot-loader/babel',
|
||||
'@babel/plugin-transform-flow-strip-types',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
[
|
||||
'@babel/plugin-transform-runtime',
|
||||
{
|
||||
regenerator: true,
|
||||
},
|
||||
],
|
||||
[
|
||||
'module-resolver',
|
||||
{
|
||||
root: [
|
||||
'./src',
|
||||
],
|
||||
alias: {
|
||||
public: [
|
||||
'./public',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
'babel-plugin-styled-components',
|
||||
];
|
||||
|
||||
if (api.env('test')) {
|
||||
presets.push('jest');
|
||||
}
|
||||
|
||||
return {
|
||||
presets,
|
||||
plugins,
|
||||
};
|
||||
};
|
40
package.json
40
package.json
@ -29,8 +29,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
"babel": "^6.23.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"bignumber.js": "2.4.0",
|
||||
"color-hash": "^1.0.3",
|
||||
"commander": "^2.19.0",
|
||||
@ -40,7 +38,7 @@
|
||||
"date-fns": "^1.29.0",
|
||||
"ethereumjs-tx": "^1.3.3",
|
||||
"ethereumjs-units": "^0.2.0",
|
||||
"ethereumjs-util": "^5.1.4",
|
||||
"ethereumjs-util": "^5.2.0",
|
||||
"express": "^4.16.3",
|
||||
"flow-webpack-plugin": "^1.2.0",
|
||||
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||
@ -81,30 +79,34 @@
|
||||
"trezor-connect": "7.0.0-beta.2",
|
||||
"wallet-address-validator": "^0.2.4",
|
||||
"web3": "1.0.0-beta.35",
|
||||
"webpack": "^4.16.3",
|
||||
"webpack": "^4.29.0",
|
||||
"webpack-build-notifier": "^0.1.29",
|
||||
"webpack-bundle-analyzer": "^2.13.1",
|
||||
"whatwg-fetch": "^2.0.4",
|
||||
"yarn-run-all": "^3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-eslint": "^8.2.6",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-plugin-module-resolver": "^3.1.1",
|
||||
"babel-plugin-styled-components": "^1.5.1",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"babel-preset-jest": "^23.2.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-proposal-class-properties": "^7.3.0",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.2.3",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"babel-eslint": "^9.0.0",
|
||||
"babel-jest": "^24.0.0",
|
||||
"babel-loader": "^8.0.5",
|
||||
"babel-plugin-module-resolver": "^3.1.3",
|
||||
"babel-plugin-styled-components": "^1.10.0",
|
||||
"babel-preset-jest": "^24.0.0",
|
||||
"cypress": "^3.1.5",
|
||||
"cypress-image-snapshot": "^3.0.0",
|
||||
"eslint": "^4",
|
||||
"eslint-config-airbnb": "^17.0.0",
|
||||
"eslint-import-resolver-babel-module": "^4.0.0",
|
||||
"eslint-import-resolver-babel-module": "^5.0.1",
|
||||
"eslint-loader": "^2.1.0",
|
||||
"eslint-plugin-chai-friendly": "^0.4.1",
|
||||
"eslint-plugin-cypress": "^2.2.0",
|
||||
@ -115,14 +117,14 @@
|
||||
"eslint-plugin-react": "^7.10.0",
|
||||
"file-loader": "1.1.11",
|
||||
"flow-bin": "0.75.0",
|
||||
"jest": "^23.4.2",
|
||||
"jest": "^24.0.0",
|
||||
"stylelint": "^8.0.0",
|
||||
"stylelint-config-standard": "^18.2.0",
|
||||
"stylelint-config-styled-components": "^0.1.1",
|
||||
"stylelint-custom-processor-loader": "^0.5.0",
|
||||
"stylelint-processor-styled-components": "^1.3.2",
|
||||
"stylelint-webpack-plugin": "^0.10.5",
|
||||
"webpack-cli": "^2.1.3",
|
||||
"webpack-cli": "^3.2.1",
|
||||
"webpack-dev-server": "^3.1.4",
|
||||
"yargs": "11.0.0"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user