Files
iptvnator/.github
4grayandClaude Fable 5.1 73575ff092 perf(web): take the form-field defaults off the initial path
app.config.ts provided MAT_FORM_FIELD_DEFAULT_OPTIONS at the root, and that
one import put the whole 54 KB chunk of @angular/material/form-field into
the initial bundle, although every form field renders in a lazy route or a
dialog. The bundler places a module in one chunk, so one eager import of any
export carries the module's entire code.

The defaults now travel with the element: AppFormFieldModule
(@iptvnator/ui/components/form-field) exports MatFormFieldModule together
with a directive that matches mat-form-field and provides the options in
its element injector. That also reaches the dialogs that root services
open, which a route-level provider would miss. Every component that renders
a form field imports it, and tools/nx/check-form-field-defaults.mjs (CI)
rejects one that does not.

renderer.initialBytes: 1,596,201 -> 1,534,606 bytes (-61,595) on a local
production build.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 09:49:55 +02:00
..
2024-06-30 18:54:51 +02:00