Hacker News new | ask | show | jobs
by intellix 2051 days ago
It seems that Material + CDK accounts for about 625kb of our bundle. Screenshot of source-map-explorer output: https://imgur.com/a/pGNlMZU

Our site is entirely data-driven via CMS and each of the Material components are available for use from there, which is why they're all in use.

We're using the latest of everything (v10 atm) as we're using Renovate so it's all correct etc

1 comments

If you care about javascript bundle size you have to avoid everything that comes from google (besides angular core & common of course). Material, animations, cdk, ... everything is just horrendously over engineered and nothing optimized for size. E.g. just look a sourcecode for material checkbox! https://github.com/angular/components/blob/master/src/materi...

Don't get me wrong, I like those bundles - and I like my frameworks over engineered. They take care of edge cases. And if I'd write a CMS I'd be all over those packages. But if your constraint is bundle size, you have to avoid them.

Agree. My last experience with angular (and ionic in particular) is it's hard to archive both good DX and UX.

There are tools that produce smaller bundle size (e.g. stencil and react) but angular has much better DX.

Svelte maybe better but not used it in production yet.