Skip to content

Commit

Permalink
feat(core): remove @babel/polyfill & use core-js@3
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed May 3, 2019
1 parent 659b4f2 commit 7411d27
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
3 changes: 2 additions & 1 deletion packages/smooth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@babel/core": "^7.4.3",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-transform-runtime": "^7.4.3",
"@babel/polyfill": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.4.0",
Expand All @@ -56,6 +55,7 @@
"babel-loader": "^8.0.5",
"camelcase": "^5.3.1",
"commander": "^2.20.0",
"core-js": "^3.0.1",
"cors": "^2.8.5",
"cwd": "^0.10.0",
"errorhandler": "^1.5.0",
Expand All @@ -73,6 +73,7 @@
"query-string": "^6.4.2",
"react-apollo": "^2.5.3",
"react-router-dom": "^5.0.0",
"regenerator-runtime": "^0.13.2",
"slugify": "^1.3.4",
"tiny-glob": "^0.2.6",
"webpack": "^4.29.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/smooth/src/babel/preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const nodeConfig = opts => ({
{
loose: true,
useBuiltIns: 'entry',
corejs: 'core-js@2',
corejs: 'core-js@3',
targets: {
node: 'current',
},
Expand All @@ -35,7 +35,7 @@ const webConfig = opts => ({
modules: false,
loose: true,
useBuiltIns: 'entry',
corejs: 'core-js@2',
corejs: 'core-js@3',
...opts['preset-env'],
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth/src/client/main-node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@babel/polyfill'
import 'core-js'

export { default as Html } from '__smooth_html'
export { default as Root } from './Root'
Expand Down
4 changes: 3 additions & 1 deletion packages/smooth/src/client/main-web.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import '@babel/polyfill'
import 'core-js'
import 'regenerator-runtime/runtime'

import React from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter } from 'react-router-dom'
Expand Down
16 changes: 4 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,6 @@
"@babel/helper-regex" "^7.4.3"
regexpu-core "^4.5.4"

"@babel/polyfill@^7.4.3":
version "7.4.3"
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.3.tgz#332dc6f57b718017c3a8b37b4eea8aa6eeac1187"
integrity sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==
dependencies:
core-js "^2.6.5"
regenerator-runtime "^0.13.2"

"@babel/preset-env@^7.4.3":
version "7.4.3"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.3.tgz#e71e16e123dc0fbf65a52cbcbcefd072fbd02880"
Expand Down Expand Up @@ -3996,10 +3988,10 @@ core-js@^1.0.0:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=

core-js@^2.6.5:
version "2.6.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==
core-js@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.0.1.tgz#1343182634298f7f38622f95e73f54e48ddf4738"
integrity sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==

[email protected], core-util-is@~1.0.0:
version "1.0.2"
Expand Down

0 comments on commit 7411d27

Please sign in to comment.