Skip to content

Commit 363b5f1

Browse files
Ignore various fixes in supported features
For example, polyfills to fix unhandled empty space characters in ES5 `''.trim()` that would be removed in ES2015
1 parent e5ebecd commit 363b5f1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/govuk-frontend/babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ module.exports = function (api) {
4949

5050
// Browser support polyfills to exclude
5151
exclude: [
52+
// Ignore various fixes in supported features
53+
// https://github.com/zloirock/core-js/blob/v3/packages/core-js-compat/src/data.mjs
54+
'es.array.includes',
55+
'es.array.iterator',
56+
'es.array.push',
57+
'es.regexp.exec',
58+
'es.regexp.to-string',
59+
'es.string.includes',
60+
'es.string.match',
61+
'es.string.replace',
62+
'es.string.trim',
63+
5264
// ES2022 Error cause is unused
5365
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
5466
'es.error.cause',

0 commit comments

Comments
 (0)