From 0f50682d78d14621b8656b18896dcfc376053273 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:39:32 +0200 Subject: [PATCH] Update babel to 7.5, and actually enable polyfills MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @babel/polyfill is deprecated in ≥ 7.4 [1], and we never actually used it as we forgot to import it [2]. Move to core-js/stable. [1] https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2 [2] https://babeljs.io/docs/en/babel-polyfill#usage-in-node-browserify-webpack --- package.json | 6 +++--- src/index.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 85701f1..2e99f7d 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" }, "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", + "@babel/core": "^7.5.4", + "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0", @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "7.4.4", + "core-js": "^3.1.4", "node-sass": "4.12.0", "react": "16.8.6", "react-dom": "16.8.6" diff --git a/src/index.js b/src/index.js index cb3ca05..0a0e535 100644 --- a/src/index.js +++ b/src/index.js @@ -17,6 +17,8 @@ * along with Cockpit; If not, see . */ +import "core-js/stable"; + import React from 'react'; import ReactDOM from 'react-dom'; import { Application } from './app.jsx';