Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cspell-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ runtimes
scroller
subcomponent
subcomponents
subpath
subpaths
swipeable
templating
transpiling
Expand Down
17 changes: 17 additions & 0 deletions docs/updating/9-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,23 @@ For more information on migrating from Vue Router v4 to v5, refer to the [Vue Ro
npm install @ionic/core@latest
```

#### Package Exports

`@ionic/core`'s `package.json` now declares an `exports` field. This fixes subpaths like `@ionic/core/components` and `@ionic/core/loader` failing under Node ESM with `ERR_UNSUPPORTED_DIR_IMPORT`. The strict ESM resolver doesn't read the nested `package.json` files the package previously relied on, and the `exports` field replaces them. This affects toolchains such as Angular 21's default Vitest builder and raw Node.

The `exports` field defines the supported public entry points, and imports of paths it doesn't cover will fail. If your app uses Node ESM, webpack 5, or TypeScript `moduleResolution: "bundler"`, `"node16"`, or `"nodenext"` and imports from an unsupported path, switch to one of the subpaths below:

| Subpath | Use |
| --------------------------------- | ------------------------------------------------ |
| `@ionic/core` | Root entry, controllers, animation builders |
| `@ionic/core/components` | Custom-element constructors and shared utilities |
| `@ionic/core/components/ion-*.js` | Single-component custom-element constructor |
| `@ionic/core/loader` | `defineCustomElements` lazy loader |
| `@ionic/core/hydrate` | SSR hydration entry |
| `@ionic/core/css/*.css` | Global stylesheets and palettes |

Apps on `moduleResolution: "node"` (classic) and webpack 4 keep resolving through the legacy fields and need no changes.

### Legacy Picker

1. Remove any usages of the `ion-picker-legacy` and `ion-picker-legacy-column` components. These components have been removed in Ionic 9. The recommended path forward is to use `ion-picker` inside a modal. Review the [Picker in Modal documentation](../api/picker.md#picker-in-modal) for more information.
Expand Down
Loading