Skip to content

Commit

Permalink
Ignore various fixes in supported features
Browse files Browse the repository at this point in the history
For example, polyfills to fix unhandled empty space characters in ES5 `''.trim()` that would be removed in ES2015
  • Loading branch information
colinrotherham committed Feb 19, 2024
1 parent e5ebecd commit 363b5f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/govuk-frontend/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ module.exports = function (api) {

// Browser support polyfills to exclude
exclude: [
// Ignore various fixes in supported features
// https://github.com/zloirock/core-js/blob/v3/packages/core-js-compat/src/data.mjs
'es.array.includes',
'es.array.iterator',
'es.array.push',
'es.regexp.exec',
'es.regexp.to-string',
'es.string.includes',
'es.string.match',
'es.string.replace',
'es.string.trim',

// ES2022 Error cause is unused
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
'es.error.cause',
Expand Down

0 comments on commit 363b5f1

Please sign in to comment.