Skip to content

Commit f25f11c

Browse files
Exclude polyfill for WHATWG URL constructor undefined base issue
Although this polyfill is required for bug-free `new URL('http://x', undefined)` in Safari versions < 14 with an `undefined` base, we don’t use it: ``` The corejs3 polyfill added the following polyfills: web.url { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" } web.url-search-params { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" } ```
1 parent ada136d commit f25f11c

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

dist/govuk-frontend-5.1.0.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/govuk-frontend-5.1.0.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/govuk-frontend-5.1.0.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/govuk-frontend-5.1.0.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/govuk-frontend/babel.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,16 @@ module.exports = function (api) {
5151
exclude: [
5252
// ES2022 Error cause is unused
5353
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
54-
'es.error.cause'
54+
'es.error.cause',
55+
56+
// WHATWG URL constructor `undefined` base fix is unnecessary
57+
// https://bugs.webkit.org/show_bug.cgi?id=216841
58+
// https://github.com/zloirock/core-js/commit/0ef4be7352e900dfa6f1eda27de22f7974576531
59+
'web.url',
60+
'web.url-search-params',
61+
'web.url-search-params.delete',
62+
'web.url-search-params.has',
63+
'web.url-search-params.size'
5564
],
5665

5766
// Replace unsupported code with polyfills

0 commit comments

Comments
 (0)