Upgrade JSS apps to JSS 21.8
Sitecore JavaScript Rendering SDKs version 21.8 introduces support for version 17 of Angular. To upgrade, you will need to make some minor changes to your Angular apps.
-
If you haven't already done so, upgrade your app to JSS 21.7.
-
Familiarize yourself with the JSS 21.8 release notes.
-
Read the Angular 17 release announcement.
To update your Angular apps:
-
Update TypeScript to
~5.2.2. -
Update Angular and all of its core dependencies to version 17, along with any related dependencies. The following list shows the required versions at time of release:
-
Angular main dependencies:
-
Angular dev dependencies:
-
Other main dependencies:
-
Other dev dependencies:
-
All remaining dependencies can be left at their current versions.
-
-
Modify
/server.bundle.tsas follows:-
Locate the following
importstatement: -
Replace that statement with the following:
-
-
Modify
src/polyfills.tsas follows:-
Locate and remove the following
importstatements, if present: -
Add a new
importstatement as follows:
-
-
Modify
src/test.tsas follows:-
Locate and remove any
importstatements containingzone.js/dist. -
Add a new
importstatement as follows:
-
-
If your existing app has other customizations that might be affected by the Angular 17 upgrade, refer to the Angular 17 upgrade guide for guidance on what further changes are required.
-
In your existing application's
package.jsonfile, update every@sitecore-jsspackage to version~21.8.0. -
Install the dependencies with the following command: