From b5196346253db7160425cab7957ccdc2bde1f853 Mon Sep 17 00:00:00 2001 From: kiddhustle Date: Mon, 14 Mar 2022 11:56:24 +0000 Subject: [PATCH] CLDC-1057: add core-js polyfills --- .browserslistrc | 2 ++ app/webpacker/packs/application.js | 2 +- package.json | 2 +- yarn.lock | 15 +-------------- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index e94f8140c..d149a5ba6 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -1 +1,3 @@ defaults +ie 11 +ie 10 \ No newline at end of file diff --git a/app/webpacker/packs/application.js b/app/webpacker/packs/application.js index 4b23686fd..58ffcdce3 100644 --- a/app/webpacker/packs/application.js +++ b/app/webpacker/packs/application.js @@ -2,7 +2,7 @@ // present in this directory. You're encouraged to place your actual application logic in // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. -require("@babel/polyfill") +require("core-js"); require.context('govuk-frontend/govuk/assets') import '../styles/application.scss' diff --git a/package.json b/package.json index 07f0e24c0..d836bda33 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ }, "dependencies": { "@activeadmin/activeadmin": "^2.9.0", - "@babel/polyfill": "^7.12.1", "@hotwired/stimulus": "^3.0.0", "@hotwired/stimulus-webpack-helpers": "^1.0.1", "@hotwired/turbo": "^7.1.0", @@ -17,6 +16,7 @@ "accessible-autocomplete": "^2.0.3", "chart.js": "^3.6.0", "chartkick": "^4.1.0", + "core-js": "3", "govuk-frontend": "^4.0.1", "stimulus": "^3.0.0", "webpack": "^4.46.0", diff --git a/yarn.lock b/yarn.lock index 0ba5311ac..f6d0a0669 100644 --- a/yarn.lock +++ b/yarn.lock @@ -785,14 +785,6 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/polyfill@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" - integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.4" - "@babel/preset-env@^7.15.0": version "7.16.11" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.11.tgz#5dd88fd885fae36f88fd7c8342475c9f0abe2982" @@ -2315,12 +2307,7 @@ core-js-compat@^3.20.2, core-js-compat@^3.21.0: browserslist "^4.19.1" semver "7.0.0" -core-js@^2.6.5: - version "2.6.12" - resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-js@^3.16.2: +core-js@3, core-js@^3.16.2: version "3.21.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.21.1.tgz#f2e0ddc1fc43da6f904706e8e955bc19d06a0d94" integrity sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==