Conversation
Author
|
md3 and ios27 have the same root imports. |
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.
Problem
The runtime imports (
createAnimation,createGesture, the lifecycle constants) come from the@ionic/coreroot, which is Ionic's lazy-loader build. Apps that use the custom elements build (Ionic 9 Angular, Ionic 8 standalone, React, Vue) then also bundle Stencil's lazy loader. Itsimport(`./${bundleId}.entry.js`)makes esbuild emit every Ionic component as an extra chunk that is never loaded, and the app gets a second copy of Ionic's shared code. esbuild also warns:The glob pattern import("./**/*.entry.js*") did not match any files.Measured in an Angular 22 + Ionic 9 app (esbuild) with ionic-theme-ios26 9.4.0, ionic-theme-md3 9.1.1 and ionic-theme-utils 0.1.1:
@ionic/core/componentsChanges
src/: all imports from@ionic/corenow use@ionic/core/components. It exports the same functions, andcustom-elements.d.tsre-exports all types. Ionic 9's own@ionic/angularimports the root only in its lazy variant.rdlabo-check-esmfails when a published.jsfile imports the@ionic/coreroot, so themes that runtest:esmcatch a regression in CI. There is a new case incheck-esm.test.mjs.Trade-off
Apps that still use the lazy-loader build get a small duplicate of these utilities instead.