-
Notifications
You must be signed in to change notification settings - Fork 13.4k
refactor(angular): make standalone imports default #31217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: major-9.0
Are you sure you want to change the base?
Changes from all commits
2432e40
ce7eefe
dc05379
95a6393
b8e58b9
521cffc
feb1a20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -99,16 +99,16 @@ The local Ionic Framework build is now active in the Angular app. Changes to the | |||||
|
|
||||||
| This is where logic that is shared between lazy loaded and standalone components live. For example, the lazy loaded IonPopover and standalone IonPopover components extend from a base IonPopover implementation that exists in this directory. | ||||||
|
|
||||||
| **Note:** This directory exposes internal APIs and is only accessed in the `standalone` and `src` submodules. Ionic developers should never import directly from `@ionic/angular/common`. Instead, they should import from `@ionic/angular` or `@ionic/angular/standalone`. | ||||||
| **Note:** This directory exposes internal APIs and is only accessed in the `standalone` and `lazy` submodules. Ionic developers should never import directly from `@ionic/angular/common`. Instead, they should import from `@ionic/angular` or `@ionic/angular/lazy`. | ||||||
|
|
||||||
| **standalone** | ||||||
|
|
||||||
| This is where the standalone component implementations live. It was added as a separate entry point to avoid any lazy loaded logic from accidentally being pulled in to the final build. Having a separate directory allows the lazy loaded implementation to remain accessible from `@ionic/angular` for backwards compatibility. | ||||||
| This is where the standalone component implementations live. It was added as a separate entry point to avoid any lazy loaded logic from accidentally being pulled in to the final build. Having a separate directory allows the lazy loaded implementation to remain accessible from `@ionic/angular/lazy` for backwards compatibility. | ||||||
|
|
||||||
| Ionic developers can access this by importing from `@ionic/angular/standalone`. | ||||||
| Ionic developers can access this by importing from `@ionic/angular`. | ||||||
|
|
||||||
| **src** | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The body text reads right now, but the heading still says |
||||||
|
|
||||||
| This is where the lazy loaded component implementations live. | ||||||
|
|
||||||
| Ionic developers can access this by importing from `@ionic/angular`. | ||||||
| Ionic developers can access this by importing from `@ionic/angular/lazy`. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "lib": { | ||
| "entryFile": "src/index.ts" | ||
| }, | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "$schema": "./node_modules/ng-packagr/ng-package.schema.json", | ||
| "lib": { | ||
| "entryFile": "src/index.ts" | ||
| "entryFile": "standalone/src/index.ts" | ||
| }, | ||
| "allowedNonPeerDependencies": ["@ionic/core", "ionicons", "jsonc-parser"] | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this section! One follow-up from my earlier review is still open: the Module Resolution paragraph further down (line 206) still uses
@ionic/angular/standaloneas its example subpath, which this PR removes. Can you point it at something that still exists, like@ionic/angular/lazyor@ionic/angular/common?