You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ Our versioning strategy is as follows:
14
14
### 🐛 Bug Fixes
15
15
16
16
*`[templates/nextjs-sxa]` The caption of image component has been fixed. ([#1874](https://github.com/Sitecore/jss/pull/1874))
17
+
*`[templates/nextjs]``[templates/react]``[templates/angular]``[templates/vue]` Fixed an issue when environment variable is undefined (not present in .env), that produced an "undefined" value in generated config file ([#1875](https://github.com/Sitecore/jss/pull/1875))
17
18
18
19
### 🎉 New Features & Improvements
19
20
@@ -24,6 +25,7 @@ Our versioning strategy is as follows:
24
25
* XMCloud-based: 'angular,angular-xmcloud'
25
26
* Rework Angular initializer to support XMCloud and SXP journeys;
26
27
* Add SXA styles to xmcloud addon
28
+
*`[create-sitecore-jss]``[template/angular]``[template/angular-xmcloud]``[template/node-xmcloud-proxy]` Edge Proxy / Context Id support ([#1875](https://github.com/Sitecore/jss/pull/1875))
27
29
28
30
*`[create-sitecore-jss]` Rework Angular initializer to support XMCloud and SXP journeys ([#1845](https://github.com/Sitecore/jss/pull/1845))([#1858](https://github.com/Sitecore/jss/pull/1858))([#1868](https://github.com/Sitecore/jss/pull/1868))
29
31
*`[create-sitecore-jss]` Allow node-xmcloud-proxy app to be installed alongside Angular SPA application
Copy file name to clipboardexpand all lines: docs/upgrades/unreleased.md
+68-6
Original file line number
Diff line number
Diff line change
@@ -11,28 +11,90 @@ If you plan to use the Angular SDK with XMCloud, you will need to perform next s
11
11
"build:client": "cross-env-shell ng build --configuration=production --base-href $npm_package_config_sitecoreDistPath/browser/ --output-path=$npm_package_config_buildArtifactsPath/browser/"
12
12
```
13
13
14
-
* Update "server.bundle.ts" to additionally expose new properties:
14
+
* Restructure /src/app/lib/client-factory.ts. This is needed in order to separate the GraphQL client factory configuration from the client factory itself, so we have a single source of GraphQL endpoint resolution that can be used in different places. For example node-xmcloud-proxy, scripts/update-graphql-fragment-data.ts, etc.
15
+
* Introduce /src/app/lib/graphql-client-factory/config.ts. It should expose the _getGraphQLClientFactoryConfig_ that returns the configuration object forthe GraphQL client factory, for example (full code snippet you can findin the "angular-xmcloud" add-on):
16
+
17
+
```ts
18
+
import { GraphQLRequestClientFactoryConfig } from '@sitecore-jss/sitecore-jss-angular/cjs';
19
+
import { environment as env } from '../../../environments/environment';
* Make sure to import variables from @sitecore-jss/sitecore-jss-angular/cjs, not from @sitecore-jss/sitecore-jss-angular, since graphql-client-factory is used in the server bundle.
53
+
54
+
* Update all the references to the GraphQL client factory in the application to use the new structure.
55
+
56
+
* Update /scripts/update-graphql-fragment-data.ts to utilize the GraphQL client factory and client factory configuration. The implementation you can find in the "angular" template (/scripts/update-graphql-fragment-data.ts
57
+
)
58
+
* Remove "isomorphic-fetch" npm dependency
59
+
60
+
* Update /scripts/generate-config.ts, it's needed since generate-config can be called outside of /scripts/bootstrap.ts file. Add dotenv import:
61
+
62
+
```ts
63
+
import 'dotenv/config';
64
+
```
65
+
66
+
67
+
* Update /server.bundle.ts to additionally expose new properties:
15
68
16
69
```ts
17
70
import { environment } from './src/environments/environment';
18
-
import { clientFactory } from './src/app/lib/graphql-client-factory';
71
+
import clientFactory from './src/app/lib/graphql-client-factory';
72
+
import { getGraphQLClientFactoryConfig } from './src/app/lib/graphql-client-factory/config';
19
73
import { dictionaryServiceFactory } from './src/app/lib/dictionary-service-factory';
20
74
import { layoutServiceFactory } from './src/app/lib/layout-service-factory';
* GraphQL FETCH_WITH method is required to be used, REST is not supported. Update FETCH_WITH environment variable if needed.
91
+
92
+
* Update /src/app/lib/dictionary-service-factory.ts to use new `useSiteQuery` property. You will be able to use a Site query to get the dictionary data:
0 commit comments