create-sitecore-jss 22.3.1-canary.8 → 22.4.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/angular-xmcloud/README.md +64 -36
- package/dist/templates/angular-xmcloud/package.json +2 -2
- package/dist/templates/nextjs/next.config.js +3 -0
- package/dist/templates/nextjs-xmcloud/package.json +2 -2
- package/dist/templates/node-xmcloud-proxy/README.md +64 -38
- package/dist/templates/vue/package.json +1 -1
- package/package.json +2 -2
|
@@ -1,60 +1,88 @@
|
|
|
1
|
-
# Angular for
|
|
1
|
+
# Angular for XM Cloud
|
|
2
2
|
|
|
3
|
-
> Sitecore JSS Angular App for XM Cloud.
|
|
3
|
+
> Sitecore JSS Angular App for XM Cloud. This feature is currently in public beta.
|
|
4
|
+
> If you encounter any issues or bugs, please submit a new issue in the [JSS GitHub Repo](https://github.com/Sitecore/jss)
|
|
4
5
|
|
|
5
|
-
[Documentation](
|
|
6
|
+
[Documentation](https://doc.sitecore.com/xmc/en/developers/jss/latest/jss-xmc/introducing-sitecore-javascript-rendering-sdk.html)
|
|
6
7
|
|
|
7
|
-
This Single Page Application (SPA) built with Angular is designed to be fully compatible with XM Cloud, incorporating several key add-ons and features to streamline the development process and enable seamless integration.
|
|
8
|
+
This Single Page Application (SPA) built with Angular is designed to be fully compatible with XM Cloud, incorporating several key add-ons and features to streamline the development process and enable seamless integration.
|
|
9
|
+
|
|
10
|
+
The Angular XM Cloud integration consists of two parts:
|
|
11
|
+
- `XM Cloud Angular`: simplifies connecting the application to XM Cloud and configuring the integration of multiple composable Sitecore products, and provides out-of-the-box helper components.
|
|
12
|
+
- `XM Cloud Proxy`: Adds integration with XM Cloud for the JSS SPA applications and enables editing, personalization and component A/B/n testing support. See [XM Cloud Proxy](../node-xmcloud-proxy/) for more information.
|
|
13
|
+
|
|
14
|
+
The following key features are supported:
|
|
8
15
|
|
|
9
16
|
- `Context ID`: The Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings.
|
|
10
17
|
|
|
11
18
|
- `XM Cloud Pages editing integration`: full integration with Pages - the dynamic visual page editor of XM Cloud.
|
|
12
19
|
|
|
13
|
-
- `XM Cloud proxy personalization` with embedded personalization and A/B
|
|
20
|
+
- `XM Cloud proxy personalization` with embedded personalization and component A/B/n testing.
|
|
14
21
|
|
|
15
|
-
- `Forms support`:
|
|
22
|
+
- `Forms support`: consume and post XM Cloud Forms in JSS apps. Using Forms, marketers can create forms, collect data, and analyze form performance.
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
- `Internationalization` support.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
> The following features and integrations are not supported by Angular and Proxy apps for XM Cloud:
|
|
27
|
+
> - Multisite
|
|
28
|
+
> - The XM Cloud Components application
|
|
29
|
+
> - BYOC components
|
|
30
|
+
> - SXA sitemap, redirects, error pages
|
|
31
|
+
> - Sitecore Experience Editor
|
|
20
32
|
|
|
21
|
-
|
|
33
|
+
## Getting Started
|
|
22
34
|
|
|
23
|
-
|
|
35
|
+
### Development
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
When building and running your app in connected (development) mode the proxy application is not needed.
|
|
26
38
|
|
|
27
|
-
|
|
39
|
+
Execute the following commands:
|
|
40
|
+
```shell
|
|
41
|
+
npm install
|
|
42
|
+
npm run build
|
|
43
|
+
npm run start:connected
|
|
44
|
+
```
|
|
28
45
|
|
|
29
|
-
The following
|
|
46
|
+
> The following features are not supported in development mode:
|
|
47
|
+
> * personalization
|
|
48
|
+
> * server-side rendering
|
|
49
|
+
> * editing
|
|
30
50
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
| `PROXY_BUILD_PATH` | Your XM Cloud Proxy server path is needed to build the app. The build output will be copied to the XMCloud Proxy application path. Default value `<xmcloud_proxy_path>\dist`.
|
|
35
|
-
| `SITECORE_EDGE_CONTEXT_ID` | The Context ID, which covers many system configurations, required for connecting to the XM Cloud back end. This is an XM Cloud system environment variable. When the application runs on the XM Cloud rendering host, this value is always set to the preview Context ID. |
|
|
36
|
-
| `SITECORE_API_KEY` | The API key for GRAPH_QL_ENDPOINT authentication. For Experience Edge, you can find the API key in the Sites dashboard by opening the actions menu for a site and navigating to Settings > Developer settings. Copy the value for SITECORE_API_KEY. For a preview endpoint (a CM instance either on XM Cloud or locally), use your preview API Key from the CM instance.
|
|
37
|
-
| `SITECORE_API_HOST` | The API hostname, needed to build the application. This should be used in combination with SITECORE_API_KEY for local development or local container setup. For example, https://<xmc_cm_host>.sitecorecloud.io. |
|
|
38
|
-
| `GRAPH_QL_ENDPOINT` | Your GraphQL Edge endpoint. This is typically optional. By default, the endpoint is calculated using the resolved Sitecore API hostname + the `graphQLEndpointPath` defined in your `package.json`. For a preview endpoint (a CM instance on XM Cloud or a local one), the value is <xmc_cm_host>/sitecore/api/graph/edge. |
|
|
39
|
-
| `SITECORE_SITE_NAME` | The name of your site. This variable overrides the config.appName defined in the package.json file. You can find this value in the Sites dashboard by opening the actions menu for a site and navigating to Settings > Developer settings. Default value `<appName>`,
|
|
40
|
-
` |
|
|
41
|
-
| `DEFAULT_LANGUAGE` | The default language of your app. Default value `en` |
|
|
42
|
-
| `DEBUG` | Optional. Debug level for the proxy. Set the DEBUG environment variable to 'sitecore-jss:*,proxy*,http-proxy-middleware*' to see all logs. Refer to the [official docs](https://doc.sitecore.com/xp/en/developers/hd/latest/sitecore-headless-development/debug-logging-in-jss-apps.html#namespaces) for all the available namespaces.
|
|
51
|
+
### Production
|
|
52
|
+
|
|
53
|
+
To build and run in production mode you need to have your Angular app side by side with the [Node XM Cloud proxy](../node-xmcloud-proxy/).
|
|
43
54
|
|
|
44
|
-
|
|
55
|
+
Execute the following commands:
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
For the Angular app:
|
|
58
|
+
```shell
|
|
59
|
+
npm install
|
|
47
60
|
|
|
48
|
-
|
|
61
|
+
# It will build the angular app and copy the the resulting `/dist` folder into the specified proxy app folder
|
|
62
|
+
npm run build
|
|
63
|
+
```
|
|
49
64
|
|
|
50
|
-
|
|
51
|
-
2. Run `npm run build` in the angular app root; this will build the angular app and copy the the resulting `/dist` folder into the specified proxy app folder
|
|
52
|
-
3. Run `npm run start` in the proxy app root
|
|
65
|
+
For the Proxy app:
|
|
53
66
|
|
|
54
|
-
|
|
67
|
+
```shell
|
|
68
|
+
npm install
|
|
69
|
+
npm run start
|
|
70
|
+
```
|
|
55
71
|
|
|
56
|
-
|
|
72
|
+
For additional information on how to set up and run a SPA app in production mode against an XM Cloud instance you can check the [spa-starters monorepo](https://github.com/sitecorelabs/xmcloud-foundation-head/tree/main/headapps/spa-starter) in the XM Cloud Foundation Starter Kit.
|
|
57
73
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
## Environment Variables
|
|
75
|
+
|
|
76
|
+
The following environment variables can be used to configure the angular app. You can use the `.env` file located in the root of the app or set these directly in the environment (for example, in containers).
|
|
77
|
+
|
|
78
|
+
| Parameter | Description |
|
|
79
|
+
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
80
|
+
| `PROXY_HOST` | Your XM Cloud Proxy hostname is needed to build the app and execute the client-side requests against the proxy server. Default value `http://localhost:3000` |
|
|
81
|
+
| `PROXY_BUILD_PATH` | Your XM Cloud Proxy server path is needed to build the app. The build output will be copied to the XM Cloud Proxy application path. Default value `<xmcloud_proxy_path>\dist`.
|
|
82
|
+
| `SITECORE_EDGE_CONTEXT_ID` | The Context ID, which covers many system configurations, is required for connecting to the XM Cloud back end. This is an XM Cloud system environment variable. When the application runs on the XM Cloud editing host, this value is always set to the preview Context ID. |
|
|
83
|
+
| `SITECORE_API_KEY` | The API key for GRAPH_QL_ENDPOINT authentication. It should be used in combination with SITECORE_API_HOST for local development when connecting to a local XM Cloud instance
|
|
84
|
+
| `SITECORE_API_HOST` | The API hostname, needed to build the application. This should be used in combination with SITECORE_API_KEY for local development. For example, https://<xmc_cm_host>.sitecorecloud.io. |
|
|
85
|
+
| `GRAPH_QL_ENDPOINT` | Your GraphQL Edge endpoint. This is typically optional. By default, the endpoint is calculated using the resolved Sitecore API hostname + the `graphQLEndpointPath` defined in your `package.json`. For a preview endpoint (a CM instance on XM Cloud or a local one), the value is <xmc_cm_host>/sitecore/api/graph/edge. |
|
|
86
|
+
| `SITECORE_SITE_NAME` | The name of your site. This variable overrides the config.appName defined in the package.json file. You can find this value in the Sites dashboard by opening the actions menu for a site and navigating to Settings > Developer settings. The default value is the name of your app. |
|
|
87
|
+
| `DEFAULT_LANGUAGE` | The default language of your app. The default value is `en` |
|
|
88
|
+
| `DEBUG` | Optional. Debug level for the application. Set the DEBUG environment variable to 'sitecore-jss:*' to see all logs. Refer to the [official docs](https://doc.sitecore.com/xmc/en/developers/jss/22/jss-xmc/debug-logging-in-jss-apps.html#namespaces) for all the available namespaces.
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"prepare:proxy-build": "ts-node --project src/tsconfig.webpack-server.json ./scripts/proxy-build.ts"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@sitecore-cloudsdk/core": "^0.4.
|
|
12
|
-
"@sitecore-cloudsdk/events": "^0.4.
|
|
11
|
+
"@sitecore-cloudsdk/core": "^0.4.2",
|
|
12
|
+
"@sitecore-cloudsdk/events": "^0.4.2",
|
|
13
13
|
"font-awesome": "^4.7.0",
|
|
14
14
|
"sass": "^1.52.3",
|
|
15
15
|
"sass-alias": "^1.0.5"
|
|
@@ -30,6 +30,9 @@ const nextConfig = {
|
|
|
30
30
|
// Enable React Strict Mode
|
|
31
31
|
reactStrictMode: true,
|
|
32
32
|
|
|
33
|
+
// Disable the X-Powered-By header. Follows security best practices.
|
|
34
|
+
poweredByHeader: false,
|
|
35
|
+
|
|
33
36
|
// use this configuration to ensure that only images from the whitelisted domains
|
|
34
37
|
// can be served from the Next.js Image Optimization API
|
|
35
38
|
// see https://nextjs.org/docs/app/api-reference/components/image#remotepatterns
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@sitecore/components": "~2.0.1",
|
|
4
|
-
"@sitecore-cloudsdk/core": "^0.4.
|
|
5
|
-
"@sitecore-cloudsdk/events": "^0.4.
|
|
4
|
+
"@sitecore-cloudsdk/core": "^0.4.2",
|
|
5
|
+
"@sitecore-cloudsdk/events": "^0.4.2",
|
|
6
6
|
"@sitecore-feaas/clientside": "^0.5.19"
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
# Node XM Cloud Proxy
|
|
2
2
|
|
|
3
|
-
> Sitecore
|
|
3
|
+
> Sitecore XM Cloud Proxy is in public beta.
|
|
4
|
+
> If you encounter any issues or bugs, please submit a new issue in the [JSS GitHub Repo](https://github.com/Sitecore/jss)
|
|
4
5
|
|
|
5
|
-
[Documentation](
|
|
6
|
+
[Documentation](https://doc.sitecore.com/xmc/en/developers/jss/latest/jss-xmc/introducing-sitecore-javascript-rendering-sdk.html)
|
|
6
7
|
|
|
7
|
-
This proxy
|
|
8
|
+
This Node.js-based proxy app is the backbone for enabling seamless integration between XM Cloud and various SPA frameworks like React, Angular, or Vue laying the groundwork for future JSS starter kits built for other front-end JavaScript frameworks. It acts as a middleware layer to handle critical functionalities such as server-side rendering (SSR), enabling editing and personalization, A/B/n component testing, and integrating Sitecore Forms. By serving as the rendering host, it ensures a smooth connection between Sitecore XM Cloud services and your front-end applications, making it easier to build dynamic, personalized, and localized experiences for users.
|
|
8
9
|
|
|
9
|
-
This is a sample setup showing
|
|
10
|
+
This is a sample setup showing how you can configure XM Cloud rendering server on top of Node.js and Express.js
|
|
10
11
|
|
|
11
12
|
## Features Supported
|
|
12
13
|
|
|
13
|
-
- `Context ID`:
|
|
14
|
+
- `Context ID`: the Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings.
|
|
14
15
|
|
|
15
16
|
- `XM Cloud Pages editing integration`: full integration with Pages - the dynamic visual page editor of XM Cloud.
|
|
16
17
|
|
|
17
|
-
- `XM Cloud proxy personalization` with embedded personalization and A/B
|
|
18
|
+
- `XM Cloud proxy personalization` with embedded personalization and Component A/B/n Testing support.
|
|
18
19
|
|
|
19
|
-
- `Forms support`: provides the capability to consume and post Sitecore Forms from JSS apps. Sitecore Forms
|
|
20
|
+
- `Forms support`: provides the capability to consume and post Sitecore Forms from JSS apps. Sitecore Forms enables marketers to author their own forms, collect data, and analyze form performance.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
- `Internationalization` support.
|
|
22
23
|
|
|
23
|
-
The
|
|
24
|
+
> The following features and integrations are not supported by Node XM Cloud Proxy:
|
|
25
|
+
> - Multisite
|
|
26
|
+
> - The XM Cloud Components application
|
|
27
|
+
> - BYOC components
|
|
28
|
+
> - SXA sitemap, redirects, error pages
|
|
29
|
+
> - Sitecore Experience Editor
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
## Getting Started
|
|
32
|
+
|
|
33
|
+
Here are the main configurations defined in the `config.ts` file in the node XM Cloud proxy app:
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
- This file contains the configuration and factory functions essential for rendering and data querying.
|
|
35
|
+
- Server Bundle Configuration:
|
|
29
36
|
|
|
37
|
+
- The app loads a `server.bundle.js` file, pre-built from your SPA app.
|
|
38
|
+
- This file contains the required configuration options.
|
|
30
39
|
- GraphQL Endpoint Setup:
|
|
31
40
|
|
|
32
41
|
- Defines a graphQLEndpoint for handling Sitecore GraphQL requests. It differentiates between production (Sitecore Edge) and development (Sitecore CM) endpoints.
|
|
@@ -42,70 +51,81 @@ The config.ts file in this proxy app handles essential configurations for server
|
|
|
42
51
|
- Contains options to control personalization features, including:
|
|
43
52
|
- Timeouts for Edge and CDP endpoints (default 400ms, configurable via environment variables).
|
|
44
53
|
- Scope and site name used for Sitecore Personalize.
|
|
45
|
-
- Enable/Disable Switch: Functions that allow you to conditionally disable personalization based on the environment (
|
|
54
|
+
- Enable/Disable Switch: Functions that allow you to conditionally disable personalization based on the environment (such as disabling it in development mode) and and cookie consent policy.
|
|
46
55
|
- Language Configuration: defaultLanguage serves as a fallback if language data is unavailable in layout data.
|
|
47
56
|
|
|
48
57
|
This configuration is designed to be flexible and secure, with dynamic settings managed via environment variables where appropriate.
|
|
49
58
|
|
|
50
59
|
### Environment Variables
|
|
51
60
|
|
|
52
|
-
The following environment variables can be
|
|
61
|
+
The following environment variables can be used to configure the Node XM Cloud Proxy app instead of modifying config.js. You can use the .env file located in the root of the app or set these directly in the environment (for example, in containers).
|
|
53
62
|
|
|
54
63
|
| Parameter | Description |
|
|
55
64
|
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
-
| `PROXY_BUNDLE_PATH` | Path to the JSS SPA app's `server.bundle.js`. Default can be seen in [config.
|
|
57
|
-
| `PROXY_PORT` | Optional. Port which will be used when start sample. Default can be seen in [config.
|
|
65
|
+
| `PROXY_BUNDLE_PATH` | Path to the JSS SPA app's `server.bundle.js`. Default can be seen in [config.ts](./src/config.ts). |
|
|
66
|
+
| `PROXY_PORT` | Optional. Port which will be used when start sample. Default can be seen in [config.ts](./src/config.ts). |
|
|
58
67
|
| `DEBUG` | Optional. Debug level for the proxy. Set the DEBUG environment variable to 'sitecore-jss:_,proxy_,http-proxy-middleware\*, 'sitecore-jss:layout','sitecore-jss:personalize' to see all logs. |
|
|
68
|
+
| `JSS_EDITING_SECRET` | Required when working with the Sitecore Editor to secure the `/api/editing/render` endpoint exposed by your proxy app. An alphanumeric value of at least 16 characters is recommended. |
|
|
69
|
+
| `PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT=` | Optional. Timeout (ms) for Sitecore CDP requests to respond within. Default is 400. |
|
|
70
|
+
| `PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT` | Optional. Timeout (ms) for Sitecore Experience Edge requests to respond within. Default is 400. |
|
|
71
|
+
|
|
59
72
|
|
|
60
73
|
## Pre-requisites
|
|
61
74
|
|
|
62
|
-
1. SPA
|
|
75
|
+
1. SPA application supports XM Cloud out of the box.
|
|
63
76
|
|
|
64
|
-
2. Build your SPA
|
|
77
|
+
2. Build your SPA application bundle with `jss build` or `npm run build`. The build output should be placed in the `dist` folder.
|
|
65
78
|
|
|
66
|
-
##
|
|
79
|
+
## Run
|
|
67
80
|
|
|
68
81
|
1. Run `npm install`
|
|
69
82
|
|
|
70
83
|
2. Run `npm run start`
|
|
71
84
|
|
|
72
|
-
|
|
85
|
+
If the operation is successful, you’ll see the following message:
|
|
73
86
|
`server listening on port 3000!`.
|
|
74
87
|
|
|
75
|
-
##
|
|
88
|
+
## Deployment options
|
|
76
89
|
|
|
77
|
-
|
|
90
|
+
### Deploy to Netlify
|
|
78
91
|
|
|
79
|
-
|
|
92
|
+
Follow these steps to deploy your application to Netlify. The deployed site can be used as an editing host in XM Cloud.
|
|
93
|
+
|
|
94
|
+
1. Run `npm init` in the root directory (which contains SPA and Node XM Cloud Proxy app folder) and add the following scripts to package.json:
|
|
80
95
|
```
|
|
81
96
|
"build": "cd ./<your-proxy-app-name> && npm run build-all && cd ..",
|
|
82
97
|
"install": "cd ./<your-proxy-app-name> && npm install && npm run install-all && cd ..",
|
|
83
98
|
```
|
|
84
|
-
2. Ensure that `<your-proxy-app-name>/package.json` includes the following commands to handle the build and install steps properly
|
|
99
|
+
2. Ensure that `<your-proxy-app-name>/package.json` includes the following commands to handle the build and install steps properly:
|
|
85
100
|
```
|
|
86
101
|
"build-all": "cd ../angular && npm run build && cd ../<your-proxy-app-name> && tsc",
|
|
87
102
|
"install-all": "cd ../angular && npm i && cd ../<your-proxy-app-name>"
|
|
88
103
|
```
|
|
89
|
-
3.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
104
|
+
3. Configure `serverless-http`:
|
|
105
|
+
- Install the npm package
|
|
106
|
+
```
|
|
107
|
+
npm i serverless-http
|
|
108
|
+
```
|
|
109
|
+
- Import serverless-http in `<your-proxy-app-name>/src/index.ts` file.
|
|
110
|
+
```
|
|
111
|
+
export const handler = serverless(server);
|
|
112
|
+
```
|
|
113
|
+
4. Create a `netlify.toml` file and ensure that the following Netlify configuration is added there:
|
|
114
|
+
- The following allows the proxy app to be treated as Netlify functions. [Functions Overview](https://docs.netlify.com/functions/overview/)
|
|
95
115
|
```
|
|
96
116
|
[functions]
|
|
97
117
|
directory = "<your-proxy-app-name>/src"
|
|
98
118
|
node_bundler = "esbuild"
|
|
99
119
|
included_files = ["<your-proxy-app-name>/dist/**"]
|
|
100
120
|
```
|
|
101
|
-
- To ensure that static assets are accessed properly
|
|
121
|
+
- To ensure that static assets are accessed properly, you might need to add the following redirects statement to the toml file:
|
|
102
122
|
```
|
|
103
123
|
[[redirects]]
|
|
104
124
|
from = "/dist/browser/*"
|
|
105
125
|
status = 200
|
|
106
126
|
to = "/browser/:splat"
|
|
107
127
|
```
|
|
108
|
-
-
|
|
128
|
+
- By default, redirects won’t be applied if there’s a file with the same path as the one defined in the `from` property. Setting `force` to `true` will make the redirect rule take precedence over any existing files.
|
|
109
129
|
```
|
|
110
130
|
[[redirects]]
|
|
111
131
|
from = "/*"
|
|
@@ -113,18 +133,24 @@ You should be able to see the following message:
|
|
|
113
133
|
to = "/.netlify/functions/index/:splat"
|
|
114
134
|
force = true
|
|
115
135
|
```
|
|
116
|
-
-
|
|
136
|
+
- Add the following build command:
|
|
117
137
|
```
|
|
118
138
|
[build]
|
|
119
139
|
command = "npm run build"
|
|
120
140
|
publish = "<your-proxy-app-name>/dist"
|
|
121
141
|
```
|
|
122
|
-
5. Create your
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
sample configuration:
|
|
142
|
+
5. Create your [Netlify deployment](https://www.netlify.com/blog/2016/09/29/a-step-by-step-guide-deploying-on-netlify/):
|
|
143
|
+
- Set up all your necessary environment variables like `SITECORE_EDGE_CONTEXT_ID`, `SITECORE_SITE_NAME` etc.
|
|
144
|
+
- Configure your build settings in the Build and Deploy tab under Site configuration.
|
|
145
|
+
- sample configuration:
|
|
146
|
+
```
|
|
126
147
|
Base Directory: /
|
|
127
148
|
Build command: npm run build
|
|
128
149
|
Publish directory: /proxy/dist
|
|
129
150
|
Functions directory: /proxy/src
|
|
130
|
-
|
|
151
|
+
```
|
|
152
|
+
NOTE: If `proxy/dist` folder is not picked up properly by Netlify make sure that the `PROXY_BUILD_PATH` env variable is unix style path e.g. `../proxy/dist`
|
|
153
|
+
|
|
154
|
+
### Deploy to Vercel
|
|
155
|
+
|
|
156
|
+
> Deployment to Vercel is not yet supported.
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@apollo/client": "^3.7.4",
|
|
47
47
|
"@panter/vue-i18next": "~0.15.2",
|
|
48
48
|
"@sitecore-jss/sitecore-jss-vue": "~<%- version %>",
|
|
49
|
-
"@vue/apollo-composable": "4.2
|
|
49
|
+
"@vue/apollo-composable": "4.0.0-beta.2",
|
|
50
50
|
"@vue/apollo-option": "^4.0.0",
|
|
51
51
|
"@vue/apollo-ssr": "^4.0.0",
|
|
52
52
|
"axios": "^1.2.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0-canary.1",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"ts-node": "^10.9.1",
|
|
66
66
|
"typescript": "~5.6.3"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d3ecb29aed9eb83d3d4db8df8ee58870aae6e74f"
|
|
69
69
|
}
|