diff --git a/app/frontend/application.js b/app/frontend/application.js index 690112f96..35694dcff 100644 --- a/app/frontend/application.js +++ b/app/frontend/application.js @@ -3,10 +3,14 @@ // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. require.context("govuk-frontend/govuk/assets") + +// Polyfills for IE import "core-js/features/promise" +import "unfetch/polyfill" +// import "./styles/application.scss" -import "./controllers" +// import "./controllers" import "@hotwired/turbo-rails" import { initAll } from "govuk-frontend" diff --git a/package.json b/package.json index 2885298d3..ee0f71a92 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "sass": "^1.49.9", "sass-loader": "^12.6.0", "stimulus": "^3.0.0", + "unfetch": "^4.2.0", "webpack": "^5.70.0", "webpack-cli": "^4.9.2", "webpack-remove-empty-scripts": "^0.7.3" diff --git a/yarn.lock b/yarn.lock index 10cf5d06c..8e256dec9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2592,6 +2592,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"