diff --git a/app/frontend/application.js b/app/frontend/application.js index a0c63f365..179355568 100644 --- a/app/frontend/application.js +++ b/app/frontend/application.js @@ -3,6 +3,7 @@ // 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") +import "core-js/features/promise" import "./styles/application.scss" import "./controllers" diff --git a/package.json b/package.json index efebb4909..f478b247d 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,12 @@ "chart.js": "^3.6.0", "chartkick": "^4.1.0", "copy-webpack-plugin": "^10.2.4", + "core-js": "^3.21.1", "css-loader": "^6.7.1", "file-loader": "^6.2.0", "govuk-frontend": "^4.0.1", "mini-css-extract-plugin": "^2.6.0", + "regenerator-runtime": "^0.13.9", "sass": "^1.49.9", "sass-loader": "^12.6.0", "stimulus": "^3.0.0", @@ -36,9 +38,9 @@ "@babel/preset-env" ], "plugins": [ - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-private-methods" - ] + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-private-methods" + ] }, "scripts": { "build": "webpack --config webpack.config.js" diff --git a/webpack.config.js b/webpack.config.js index 7a4cf25ae..7af8a0f5f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,7 +17,7 @@ module.exports = { application: [ "./app/frontend/application.js", ], - active_admin:[ + active_admin: [ './app/frontend/active_admin.js', './app/frontend/styles/active_admin.scss' ] diff --git a/yarn.lock b/yarn.lock index c99037e96..10cf5d06c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1470,6 +1470,11 @@ core-js-compat@^3.20.2, core-js-compat@^3.21.0: browserslist "^4.19.1" semver "7.0.0" +core-js@^3.21.1: + version "3.21.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.21.1.tgz#f2e0ddc1fc43da6f904706e8e955bc19d06a0d94" + integrity sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig== + cosmiconfig@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" @@ -2302,7 +2307,7 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.4: +regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.9: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==