Skip to content

Commit

Permalink
Bump babel and replace babel/polyfill (#3846)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Vilsbol committed Feb 18, 2021
1 parent d597d85 commit c1f8d56
Show file tree
Hide file tree
Showing 7 changed files with 849 additions and 228 deletions.
13 changes: 10 additions & 3 deletions babel.config.js
Expand Up @@ -4,9 +4,16 @@ module.exports = {
'@babel/preset-typescript',
[
'@babel/preset-env',
// Enable lodash tree shaking
// https://www.azavea.com/blog/2019/03/07/lessons-on-tree-shaking-lodash/
{ modules: false, targets: { node: 8 } }
{
// Enable lodash tree shaking
// https://www.azavea.com/blog/2019/03/07/lessons-on-tree-shaking-lodash/
modules: false,
targets: { node: 8 },
// babel defaults to core-js@2.
// https://github.com/babel/babel/issues/9713#issuecomment-474828830
useBuiltIns: 'usage',
corejs: 3
}
]
],
plugins: [
Expand Down
1 change: 0 additions & 1 deletion jest_config/setupJest.js
@@ -1,3 +1,2 @@
'use strict';
require('isomorphic-fetch');
require('@babel/polyfill');
20 changes: 11 additions & 9 deletions package.json
Expand Up @@ -11,6 +11,7 @@
"yarn": ">= 1.19.1"
},
"dependencies": {
"@babel/plugin-proposal-private-methods": "7.12.13",
"@blockstack/stats": "0.7.0",
"@ethersproject/abstract-provider": "5.0.9",
"@ethersproject/address": "5.0.10",
Expand Down Expand Up @@ -44,6 +45,7 @@
"bignumber.js": "9.0.0",
"bn.js": "4.11.8",
"classnames": "2.2.5",
"core-js": "3.8.3",
"date-fns": "2.16.1",
"ethereumjs-abi": "0.6.8",
"ethereumjs-util": "6.0.0",
Expand All @@ -60,7 +62,7 @@
"qrcode": "1.4.4",
"query-string": "6.0.0",
"ramda": "0.27.1",
"rc-slider": "8.6.0",
"rc-slider": "8.6.5",
"rc-steps": "3.5.0",
"react": "16.12.0",
"react-content-loader": "5.1.4",
Expand All @@ -79,6 +81,7 @@
"redux-logger": "3.0.6",
"redux-persist": "6.0.0",
"redux-saga": "1.1.3",
"regenerator-runtime": "0.13.7",
"rskjs-util": "1.0.3",
"sha256": "0.1.1",
"styled-components": "5.1.0",
Expand All @@ -93,15 +96,14 @@
"yup": "0.28.2"
},
"devDependencies": {
"@babel/core": "7.9.0",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-object-rest-spread": "7.8.3",
"@babel/core": "7.12.16",
"@babel/plugin-proposal-class-properties": "7.12.13",
"@babel/plugin-proposal-object-rest-spread": "7.12.13",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-modules-commonjs": "7.9.0",
"@babel/polyfill": "7.8.3",
"@babel/preset-env": "7.8.7",
"@babel/preset-react": "7.8.3",
"@babel/preset-typescript": "7.8.3",
"@babel/plugin-transform-modules-commonjs": "7.12.13",
"@babel/preset-env": "7.12.16",
"@babel/preset-react": "7.12.13",
"@babel/preset-typescript": "7.12.16",
"@ledgerhq/hw-transport-mocker": "5.38.0",
"@lowb/preload-webpack-plugin": "3.0.2",
"@phenomnomnominal/tsquery": "4.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/index.tsx
@@ -1,7 +1,6 @@
// Application styles must come first in order, to allow for overrides
import 'font-awesome/scss/font-awesome.scss';
import 'sass/styles.scss';
import '@babel/polyfill';

import 'whatwg-fetch'; // @todo: Investigate utility of dependency
import 'what-input'; // @todo: Investigate utility of dependency; Used in sass/styles.scss for `data-whatintent`
Expand Down
2 changes: 1 addition & 1 deletion src/workers/polling.worker.tsx
@@ -1,4 +1,4 @@
import 'idempotent-babel-polyfill';
// import 'idempotent-babel-polyfill';

export enum PollingAction {
START = 'POLLING_WORKER_START',
Expand Down
7 changes: 5 additions & 2 deletions webpack_config/common.js
Expand Up @@ -29,10 +29,13 @@ module.exports = {

resolve: {
extensions: ['.ts', '.tsx', '.js', '.css', '.json', '.scss'],
modules: [config.path.src, config.path.modules, config.path.root],
modules: [config.path.src, config.path.root, 'node_modules'],
alias: {
modernizr$: path.resolve(__dirname, '../.modernizrrc.js'),
'@fixtures': `${config.path.root}/jest_config/__fixtures__`
'@fixtures': `${config.path.root}/jest_config/__fixtures__`,
// recharts 1.8.5 relies on core-js@2. Allow it to resolve to core-js@3
// https://github.com/recharts/recharts/issues/1673#issuecomment-499680671
'core-js/es6': 'core-js/es'
},
plugins: [new TsconfigPathsPlugin({ configFile: path.resolve(__dirname, '../tsconfig.json') })]
},
Expand Down

0 comments on commit c1f8d56

Please sign in to comment.