Skip to content

feat(angular, react, vue): export additional core APIs - #31864

Open
brandyscarney wants to merge 3 commits into
feature-9.1from
FW-8032
Open

brandyscarney wants to merge 3 commits into
feature-9.1from
FW-8032

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Issue number: internal


What is the current behavior?

The docs import several APIs from @ionic/core in Angular, React and Vue examples, such as getMode on the Config page, OverlayEventDetail in the modal examples, and setNonce from @ionic/core/loader in 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/core dependency, so they fail with pnpm or Yarn PnP. Each framework package pins @ionic/core to an exact version when published, so adding it yourself at another version installs two copies.

What is the new behavior?

  • @ionic/react exports getMode, componentOnReady, menuController, setNonce, OverlayEventDetail, RangeValue and SelectInterface.
  • @ionic/vue exports getMode, componentOnReady, setNonce, OverlayEventDetail, RangeValue and SelectInterface. It already exported menuController.
  • @ionic/angular exports componentOnReady, setNonce, OverlayEventDetail, RangeValue and SelectInterface from both the standalone and lazy entry points. It doesn't export getMode or menuController, because Angular reads the mode through Config and has its own MenuController.
  • Tests in the React and Vue test apps check the new exports.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 9.0.15-dev.11796247574.1ecbe59d

React's alertController is left out on purpose. The only docs page that imports it is the JavaScript-only ion-route page, and React apps use useIonAlert or IonAlert.

setNonce comes from the build each framework renders with. React, Vue and Angular standalone use @ionic/core/components, which has its own setNonce, so the security guide's @ionic/core/loader import doesn't apply to them. Angular lazy re-exports the loader's setNonce.

The docs examples will switch to importing from the framework package in a follow-up.

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.
@brandyscarney
brandyscarney requested a review from a team as a code owner December 2, 2026 20:24
@brandyscarney
brandyscarney requested a review from thetaPC December 2, 2026 20:24
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Dec 3, 2026 5:53pm UTC

Request Review

@github-actions github-actions Bot added package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Dec 2, 2026
@brandyscarney
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.

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

1 active deployment
Preview — a5e15734 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: react @ionic/react package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants