Skip to content

Commit c5acf29

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 49f8596 commit c5acf29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/govuk-frontend/babel.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ 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.regexp.exec',
57+
'es.regexp.to-string',
58+
'es.string.includes',
59+
'es.string.match',
60+
'es.string.replace',
61+
'es.string.trim',
62+
5263
// ES2022 Error cause is unused
5364
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
5465
'es.error.cause',

0 commit comments

Comments
 (0)