-
Notifications
You must be signed in to change notification settings - Fork 404
feat: use standalone-friendly bootstrapApplication Angular API instead of bootstrapModule #21059
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
Merged
+6,066
−1,177
Conversation
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
- use bootstrapApplication in main.ts and main.server.ts - change AppComponent to standalone - create app.config.ts with Angular providers and importProvidersFrom(AppModule) - create app.config.server.ts with SSR-specific providers (moved from AppServerModule) - remove AppServerModule as empty (because moved its contents to new app.config.server.ts) By the way, aligned the shape of AppModule and SpartacusConfigurationModule to customer's apps: 1. Move out stuff from AppModule: - i18n config moved from AppModule to SpartacusConfigurationModule - configs specific to only our example storefront app and e2e testing moved from AppModule to privateProviders in separate file 2. Created file SpartacusConfigurationModule with things common for b2b and b2c - SpartacusB2bConfigurationModule (and B2c) renamed to spartacusB2bConfigurationProviders (and B2c respectively) - imported spartacusB2bConfigurationProviders (and B2c) in SpartacusConfigurationModule, based on the environment.b2b
…ature/CXSPA-11890
…eature/CXSPA-11890
…eature/CXSPA-11890
…ature/CXSPA-11890
…ar.json files to include new standalone:true config for generator schematics
…rom Angular-created app.module.server.ts (it's now unnecessary, because fresh standalone apps put those things in app.config.server.ts, which is already removed by our other schematics)
pawelfras
reviewed
Jan 27, 2026
…'modernize-app-TO-standalone-bootstrap-application' (#21080)
…ature/CXSPA-11890-v2
spartacus
|
||||||||||||||||||||||||||||||
| Project |
spartacus
|
| Branch Review |
feature/CXSPA-11890-v2
|
| Run status |
|
| Run duration | 11m 43s |
| Commit |
|
| Committer | Krzysztof Platis |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
4
|
|
|
0
|
|
|
0
|
|
|
101
|
Upgrade your plan to view test results. | |
| View all changes introduced in this branch ↗︎ | |
Contributor
Merge Checks Failed |
pawelfras
approved these changes
Jan 28, 2026
Contributor
pawelfras
left a comment
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.
Review and QA done.
What was tested
- installation in fresh Angular app, with CSR
- installation in fresh Angular app, with SSR
- migration of Spartacus app, with CSR
- migration of Spartacus app, with SSR
- build of storefrontapp in various combination
- serving storefrontapp in various combination
LGTM!
Before merging, please run the branch against Spartacus build pipeline to run all e2es
spartacus
|
||||||||||||||||||||||||||||||
| Project |
spartacus
|
| Branch Review |
feature/CXSPA-11890-v2
|
| Run status |
|
| Run duration | 41m 30s |
| Commit |
|
| Committer | Krzysztof Platis |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
5
|
|
|
17
|
|
|
0
|
|
|
699
|
Upgrade your plan to view test results. | |
| View all changes introduced in this branch ↗︎ | |
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.
Detailed scope:
bootstrapApplicationinmain.tsandmain.server.tsAppComponentto standaloneapp.config.tswith Angular-speciifc providers (+importProvidersFrom(AppModule))app.config.server.tsAngular-specific SSR providers (+importsProvidersFrom(AppServerModule))server.tsfromAppServerModuletobootstrapapp.config.tsandapp.config.server.tsSpartacusModuleand SpartacusAppRoutingModule) are kept inAppModuleprovideServer()is kept inAppServerModuleserver.tsis nowbootstrap(instead ofAppServerModule)app.module.server.ts)--standalone=false:221121_08/installation.mdscripts/install/.run.shscriptangular.json- to include standalone:true config for generator schematicsBy the way, moved out our private repo's stuff from
AppModuleandSpartacusConfigurationModule- to align it 1:1 with fresh customer's apps:AppModule:AppModuletoSpartacusConfigurationModuleAppModuletoprivateProvidersin separate file in storefrontappSpartacusConfigurationModulewith things common for b2b and b2c (like in customer apps)SpartacusB2bConfigurationModule(andB2c) renamed tospartacusB2bConfigurationProviders(andB2crespectively) and moved there only stuff related to b2b (and b2c respectively)spartacusB2bConfigurationProviders(andB2c) inSpartacusConfigurationModule, based on theenvironment.b2bBy the way:
test:schematics- which runs tests just for the theprojects/schematics/Note: in another partial PR there are modernization/migration schematics for existing projects: #21043
closes https://jira.tools.sap/browse/CXSPA-11890
Things to QA: