My journey creating a sample Angular app involved several steps:
npm i -g @angular/cli
(Installed Angular 11.2)ng new foo
- Opted in for SASS, Angular Router, and analytics
cd foo
- Updated
.browserslistrc
withlast 1 Chrome version
. (Verification withnpx browserslist
showed onlychrome 89
, as expected.) ng build --prod
The outcome of these actions is displayed below:
$ ng build --prod
✔ Browser application bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.
Initial Chunk Files | Names | Size
main.feaf6a85348d901578d8.js | main | 211.52 kB
polyfills.00096ed7d93ed26ee6df.js | polyfills | 35.98 kB
runtime.7b63b9fd40098a2e8207.js | runtime | 1.45 kB
styles.09e2c710755c8867a460.css | styles | 0 bytes
| Initial Total | 248.95 kB
Build at: 2021-03-16T14:41:16.954Z - Hash: 57aec26226ae3eb0ee1b - Time: 12529ms
I find it puzzling that 36kb of polyfills were compiled when I am only targeting the latest Chrome version. In my opinion, this should necessitate minimal or no polyfills at all.
What function do these 36kb serve? It's challenging to decipher due to the minified nature of the file.