Skip to content

Commit

Permalink
Add Babel logging for required polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Oct 4, 2023
1 parent 1bac999 commit df8154a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/govuk-frontend/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
module.exports = function (api) {
const isBrowser = !api.env('test')
const isProduction = api.env('production')

// Apply Browserslist environment for supported targets
// https://github.com/browserslist/browserslist#configuring-for-different-environments
Expand Down Expand Up @@ -37,6 +38,9 @@ module.exports = function (api) {
[
'polyfill-es-shims',
{
// Add logging for required polyfills
debug: isProduction,

// Replace unsupported code with polyfills
// without modifying window globals
method: 'usage-pure'
Expand Down

0 comments on commit df8154a

Please sign in to comment.