Skip to content

perf(kit): use granular Ionic controller imports - #91

Merged
rdlabo merged 1 commit into
mainfrom
perf/granular-ionic-controllers
Aug 27, 2026
Merged

perf(kit): use granular Ionic controller imports#91
rdlabo merged 1 commit into
mainfrom
perf/granular-ionic-controllers

Conversation

@rdlabo

@rdlabo rdlabo commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace runtime imports from the @ionic/angular root barrel with the public controller entrypoints
  • import NavController from @ionic/angular/common
  • preserve the existing public API and Angular DI token identities

Why

The root barrel makes consuming applications retain the Ionic standalone component graph even when the kit only needs overlay controllers. In the SeatKeep production graph, this change removes the standalone root index from the initial static closure.

Measured impact

  • initial JS static closure: 4,327,131 bytes -> 3,475,785 bytes
  • reduction: 851,346 bytes (19.7%)
  • independent review reproduced an approximately 852 kB reduction and confirmed it is removal from the static closure, not chunk relocation

Verification

  • npm run lint
  • npm test (74 files, 1,075 tests)
  • npm run prebuild
  • generated kit FESM has no runtime from '@ionic/angular' import
  • SeatKeep consumer build and tests (app: 116 files / 866 tests; site: 1 file / 1 test)
  • manager review: approved, no blocking findings
  • independent acceptance review: approved, no blocking findings

No migration notes are needed because this is an internal import-boundary change with no public API or behavior change. The package version is intentionally unchanged and will be managed during release.

@rdlabo
rdlabo merged commit 68c0b1c into main Aug 27, 2026
13 checks passed
@rdlabo
rdlabo deleted the perf/granular-ionic-controllers branch August 27, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant