Skip to content

docs: import core APIs from the framework packages - #4929

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

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

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Updates the Angular, React and Vue examples to import getMode, componentOnReady, menuController, setNonce and the overlay, checkbox and select types from the framework package instead of @ionic/core, now that ionic-team/ionic-framework#31864 re-exports them. Importing from @ionic/core only works when npm hoists it, so these examples fail with pnpm or Yarn PnP.

  • The usage examples for action sheet, alert, config mode, menu, modal and select import from @ionic/angular, @ionic/react or @ionic/vue.
  • The Angular, React and Vue testing pages import componentOnReady from the framework package.
  • The security guide's setNonce example has a tab per framework. React, Vue and Angular standalone render with a different Ionic build than @ionic/core/loader, so the old import never applied the nonce to their components. The JavaScript tab now uses a <meta name="csp-nonce"> tag, because the quickstart loads /ionic.esm.js, which has its own setNonce, so the @ionic/core/loader import didn't reach its components either. Every Ionic build reads the meta tag when it has no nonce set.
  • The config mode examples drop the || 'md' fallback, since getMode() already returns md when no mode is set.
  • The v9 playground and StackBlitz projects use dev build 9.0.15-dev.11796247574.1ecbe59d, which includes feat(angular, react, vue): export additional core APIs ionic-framework#31864, so the changed examples work in StackBlitz. It replaces the toggle dev build 9.0.13-dev.11795209321.12c3c69e, which it also includes.

JavaScript, Stencil and "Ionic Core + TypeScript" examples, and the 6.0 upgrade guide, still import from @ionic/core.

The JavaScript example on the mode page opens in StackBlitz with an empty button. That's an existing bug on main, fixed separately in #4931.

Accessing the mode
Ionic and CSP

@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-docs Ready Ready Preview Dec 2, 2026 11:06pm UTC

Request Review

@brandyscarney
brandyscarney requested a review from a team as a code owner December 2, 2026 22:26
@brandyscarney
brandyscarney requested review from ShaneK and removed request for a team December 2, 2026 22:26

This branch was successfully deployed

1 active deployment
Preview — 141c5d8d Deployed Dec 2, 2026 by vercel[bot]
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