feat(client)!: state the browser floors and drop the IE-era polyfills

There was no .browserslistrc and no browserslist key, so the build had been
resolving browserslist's defaults - 32 entries including and_qq, and_uc,
op_mini and Chrome 109. The new file states the policy as version floors, so the
build moves only when we move it:

  chrome >= 131   (November 2024)
  edge   >= 131   (November 2024, Chromium numbering)
  firefox >= 128  (July 2024, the ESR - corporate pins it)
  safari >= 17    (September 2023, and iOS 17 with it)
  not dead

With those targets stated, src/polyfills.ts no longer needs the fifteen core-js
ES6/ES7 imports it carried from the IE era, and nothing else in src imports
core-js, so the dependency goes too (package.json, package-lock.json and the
angular.json commonjs allow-list).

Measured on the same tree: polyfills.js 155,341 -> 93,953 bytes raw (-39.5%),
gzip 47,819 -> 25,767 (-46%, about 22 KiB per visit on every route); main.js
unchanged.

BREAKING CHANGE: the supported browsers are now Chrome/Edge 131+, Firefox 128+
and Safari/iOS 17+. A client on Chrome 110 or Safari 16 no longer gets the
shims and is not supported.
This commit is contained in:
dc committed 2026-11-09 01:31:54 +00:00
1 parent 79b3eff7f8
commit 2f3c332b5f
5 files changed
+29 -37

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# Browsers Data Controller supports.
#
# The policy is the last one to two years of the four engines our estates
# actually run - Edge first (most of our users), then Chrome, Firefox and
# Safari. Nothing older, and no IE: the security updates of the last six months
# are a fair reason to expect an evergreen browser, and Angular cannot run on
# EdgeHTML or IE anyway.
#
# Version floors rather than `last 2 versions`: a floor is a statement we can
# test against, and it does not move the build every time an engine ships.
# Roughly two years back from late 2026:
#
# chrome 131 November 2024
# edge 131 November 2024 (Chromium, same numbering)
# firefox 128 July 2024 (the ESR, kept because corporate pins it)
# safari 17 September 2023 (and iOS 17, which ships with it)
#
# Move these deliberately, with the release dates, when the window moves.
chrome >= 131
edge >= 131
firefox >= 128
safari >= 17
ios_saf >= 17
not dead
-1
View File
@@ -29,7 +29,6 @@
"allowedCommonJsDependencies": [
"handsontable",
"exceljs",
"core-js",
"pikaday",
"querystring",
"punycode",
-18
View File
@@ -68,7 +68,6 @@
"@compodoc/compodoc": "^2.0.0",
"@cypress/webpack-preprocessor": "^5.17.1",
"@lhci/cli": "^0.15.1",
"@types/core-js": "^2.5.5",
"@types/create-hash": "^1.2.6",
"@types/create-hmac": "^1.1.3",
"@types/crypto-js": "^4.2.1",
@@ -81,7 +80,6 @@
"@typescript-eslint/eslint-plugin": "8.65.0",
"@typescript-eslint/parser": "8.65.0",
"archiver": "8.0.0",
"core-js": "^2.5.4",
"cypress": "^15.19.0",
"cypress-file-upload": "^5.0.8",
"cypress-plugin-tab": "^1.0.5",
@@ -9220,13 +9218,6 @@
"@types/node": "*"
}
},
"node_modules/@types/core-js": {
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/@types/core-js/-/core-js-2.5.8.tgz",
"integrity": "sha512-VgnAj6tIAhJhZdJ8/IpxdatM8G4OD3VWGlp6xIxUGENZlpbob9Ty4VVdC1FIEp0aK6DBscDDjyzy5FB60TuNqg==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/cors": {
"version": "2.8.19",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz",
@@ -12646,15 +12637,6 @@
"webpack": "^5.1.0"
}
},
"node_modules/core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"dev": true,
"hasInstallScript": true,
"license": "MIT"
},
"node_modules/core-js-compat": {
"version": "3.50.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.50.0.tgz",
-2
View File
@@ -107,7 +107,6 @@
"@compodoc/compodoc": "^2.0.0",
"@cypress/webpack-preprocessor": "^5.17.1",
"@lhci/cli": "^0.15.1",
"@types/core-js": "^2.5.5",
"@types/create-hash": "^1.2.6",
"@types/create-hmac": "^1.1.3",
"@types/crypto-js": "^4.2.1",
@@ -120,7 +119,6 @@
"@typescript-eslint/eslint-plugin": "8.65.0",
"@typescript-eslint/parser": "8.65.0",
"archiver": "8.0.0",
"core-js": "^2.5.4",
"cypress": "^15.19.0",
"cypress-file-upload": "^5.0.8",
"cypress-plugin-tab": "^1.0.5",
+5 -16
View File
@@ -18,22 +18,11 @@
* BROWSER POLYFILLS
*/
import 'core-js/es6/symbol'
import 'core-js/es6/object'
import 'core-js/es6/function'
import 'core-js/es6/parse-int'
import 'core-js/es6/parse-float'
import 'core-js/es6/number'
import 'core-js/es6/math'
import 'core-js/es6/string'
import 'core-js/es6/date'
import 'core-js/es6/array'
import 'core-js/es6/regexp'
import 'core-js/es6/map'
import 'core-js/es6/set'
import 'core-js/es6/reflect'
import 'core-js/es7/reflect'
// No core-js imports. The engines in .browserslistrc are all evergreen (Chrome
// and Edge 131+, Firefox 128+, Safari 17+), so every ES2015+ feature the app
// uses is native there - the ES6/ES7 shims that used to sit here dated from the
// IE era and cost about 148 kB of the initial bundle to define things the
// browsers already have.
/**
* By default, zone.js will patch all possible macroTask and DomEvents