diff --git a/app/javascript/shared/polyfills.js b/app/javascript/shared/polyfills.js index 24b086ccc..d08eb91bf 100644 --- a/app/javascript/shared/polyfills.js +++ b/app/javascript/shared/polyfills.js @@ -1,9 +1,10 @@ // Include runtime-polyfills for older browsers. // Due to babel.config.js's 'useBuiltIns', only polyfills actually // required by the browsers we support will be included. -import '@babel/polyfill'; +import 'core-js/stable'; +import 'regenerator-runtime/runtime'; import 'dom4'; +import 'intersection-observer'; + import './polyfills/insertAdjacentElement'; import './polyfills/dataset'; - -import('intersection-observer'); diff --git a/babel.config.js b/babel.config.js index 61ca37797..9c0040b9a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -29,8 +29,8 @@ module.exports = function(api) { require('@babel/preset-env').default, { forceAllTransforms: true, - useBuiltIns: 'entry', - corejs: 2, + useBuiltIns: 'usage', + corejs: 3, modules: false, exclude: ['transform-typeof-symbol'] } diff --git a/config/environments/development.rb b/config/environments/development.rb index 718db3436..82ee10641 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -39,6 +39,9 @@ Rails.application.configure do # yet still be able to expire them through the digest params. config.assets.digest = true + # Suppress logger output for asset requests. + config.assets.quiet = true + # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. diff --git a/package.json b/package.json index 70a46b48c..01656a298 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "babel-plugin-macros": "^2.8.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "chartkick": "^3.2.0", - "core-js": "^2.0.0", + "core-js": "^3.6.4", "debounce": "^1.2.0", "dom4": "^2.1.5", "email-butler": "^1.0.13", diff --git a/yarn.lock b/yarn.lock index b17ed8b91..501bc0a24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2572,16 +2572,16 @@ core-js-compat@^3.6.0: browserslist "^4.8.3" semver "7.0.0" -core-js@^2.0.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" - integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== - core-js@^3.4.0: version "3.6.2" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.2.tgz#2799ea1a59050f0acf50dfe89b916d6503b16caa" integrity sha512-hIE5dXkRzRvnZ5vhkRfQxUvDxQZmD9oueA08jDYRBKJHx+VIl/Pne/e0A4x9LObEEthC/TqiZybUoNM4tRgnKg== +core-js@^3.6.4: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" + integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"