fix(ionic): update to ionic 9 and fix routing - #179
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
brandyscarney
marked this pull request as ready for review
August 19, 2026 19:23
brandyscarney
enabled auto-merge (squash)
August 19, 2026 19:23
ShaneK
approved these changes
Aug 19, 2026
pull Bot
pushed a commit
to Zezo-Ai/ionic-framework
that referenced
this pull request
Aug 19, 2026
…#31375) Issue number: internal --------- ## What is the current behavior? Currently, core builds with `target: es2022` and no `useDefineForClassFields` setting, so TypeScript defaults it to `true` and emits every `@Prop` default as a class field instead of a constructor assignment. Stencil proxies props onto the component prototype as getter/setter pairs, and its setter returns early when the host ref isn't registered yet. An app that downlevels those class fields hoists the initializers above `registerInstance()`, so the setter drops every default. That happens in any Stencil app importing `@ionic/core` with a target below es2022, since the app re-transpiles core. ## What is the new behavior? Setting `useDefineForClassFields: false` restores the emit v8 shipped: `registerInstance()` runs first, then the defaults assign through Stencil's setter. There's nothing left for a downstream bundler to hoist, so the defaults survive whatever target the app uses. Every output target picks it up. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information Regression from ionic-team#31280, which moved core to `target: es2022` and flipped the TypeScript default. Brandy hit it on [the docs-demo v9 update](ionic-team/docs-demo#179), where the Input OTP page renders an empty group. I packed this build into that branch with no docs-demo changes and the boxes come back. I put the flag in `core/tsconfig.json` rather than the shared `tsconfig.base.json`, so the six packages extending the base emit the same bytes as before. I didn't add a test. It only breaks in a downstream build, so covering it means asserting on the shape of core's emitted output, which we don't do anywhere. Happy to add something if you'd rather have one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates to latest
ionic(v9) andstenciland related dependencies/code.