Repository navigation
feat(angular, react, vue): export additional core APIs - #31864
Open
brandyscarney wants to merge 3 commits into
Open
brandyscarney wants to merge 3 commits into
brandyscarney wants to merge 3 commits into
Conversation
The docs import getMode, componentOnReady, OverlayEventDetail and other APIs from @ionic/core in framework examples. Those imports only resolve because npm hoists the framework's @ionic/core dependency, so they fail with pnpm or Yarn PnP. Re-export them from each framework package. - react: getMode, componentOnReady, menuController, OverlayEventDetail, RangeValue, SelectInterface - vue: getMode, componentOnReady, OverlayEventDetail, RangeValue, SelectInterface - angular (lazy and standalone): componentOnReady, OverlayEventDetail, RangeValue, SelectInterface Angular reads the mode through Config and has its own MenuController, so it does not export getMode or menuController.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brandyscarney
marked this pull request as draft
December 2, 2026 20:33
The security guide imports setNonce from @ionic/core/loader. React, Vue and Angular standalone render through @ionic/core/components, which has its own setNonce. Re-export the one each framework uses: the components build for React, Vue and Angular standalone, and the loader for Angular lazy.
brandyscarney
marked this pull request as ready for review
December 2, 2026 22:24
ShaneK
approved these changes
Dec 3, 2026
ShaneK
left a comment
Member
There was a problem hiding this comment.
Looks good to me! Just one thing on the Vue test, since nothing there would catch the new types going missing.
Co-authored-by: Shane <561207+ShaneK@users.noreply.github.com>
This branch was successfully deployed
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.
Issue number: internal
What is the current behavior?
The docs import several APIs from
@ionic/corein Angular, React and Vue examples, such asgetModeon the Config page,OverlayEventDetailin the modal examples, andsetNoncefrom@ionic/core/loaderin the security guide. The framework packages don't re-export them, and the install docs never say to add@ionic/core.These imports only resolve because npm hoists the framework's
@ionic/coredependency, so they fail with pnpm or Yarn PnP. Each framework package pins@ionic/coreto an exact version when published, so adding it yourself at another version installs two copies.What is the new behavior?
@ionic/reactexportsgetMode,componentOnReady,menuController,setNonce,OverlayEventDetail,RangeValueandSelectInterface.@ionic/vueexportsgetMode,componentOnReady,setNonce,OverlayEventDetail,RangeValueandSelectInterface. It already exportedmenuController.@ionic/angularexportscomponentOnReady,setNonce,OverlayEventDetail,RangeValueandSelectInterfacefrom both the standalone and lazy entry points. It doesn't exportgetModeormenuController, because Angular reads the mode throughConfigand has its ownMenuController.Does this introduce a breaking change?
Other information
Dev build:
9.0.15-dev.11796247574.1ecbe59dReact's
alertControlleris left out on purpose. The only docs page that imports it is the JavaScript-onlyion-routepage, and React apps useuseIonAlertorIonAlert.setNoncecomes from the build each framework renders with. React, Vue and Angular standalone use@ionic/core/components, which has its ownsetNonce, so the security guide's@ionic/core/loaderimport doesn't apply to them. Angular lazy re-exports the loader'ssetNonce.The docs examples will switch to importing from the framework package in a follow-up.