feat(angular): allow per-component standalone import paths for better code-splitting - #31303
Open
OS-jacobbell wants to merge 10 commits into
Open
feat(angular): allow per-component standalone import paths for better code-splitting#31303OS-jacobbell wants to merge 10 commits into
OS-jacobbell wants to merge 10 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
OS-jacobbell
commented
Jul 29, 2026
|
|
||
| const p = spawn(cmd, args, { cwd: typescriptPath, stdio: 'inherit', shell: true }); | ||
| const typescriptPath = path.join(__dirname, '..', 'node_modules', '.bin'); | ||
| const p = spawn(cmd, args, { cwd: typescriptPath, stdio: 'inherit'}); |
Contributor
Author
There was a problem hiding this comment.
Removing shell: true fixes a deprecation warning when building.
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: resolves #30114
What is the current behavior?
Any standalone components imported by one page are bundled with every page. E.g. a landing page will deliver all Ionic Framework components used by the web app, even if most of them are not used by the landing page. Because all components are imported from one file, build tools don't split the code well.
What is the new behavior?
import { IonToolbar } from '@ionic/angular/ion-toolbar'@ionic/angularis now a barrel file, maintaining backwards compatibility.standalone/srcpattern tosrc/standalone.packages/angular/package.jsonthepackage.jsonthat will be used in the npm package, in line with the React and Vue packages.Does this introduce a breaking change?
Other information
I'm unfamiliar with Angular npm package best practices, I just set up what seems reasonable to match the React and Vue ones. Also not sure if release scripts will need to be updated.