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
* Updated Readme.md for monorepo support
* Ran prettier format to fix styling issues in readme.md
* Tweak README
- don't mention specific monorepo tools
- remove extraneous files
- link pnpm issue
- reword some things
---------
Co-authored-by: Geoff Rich <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ When deploying to Azure, you will need to properly [configure your build](https:
41
41
42
42
If you use a custom API directory (see [below](#apiDir)), your `api_location` will be the same as the value you pass to `apiDir`.
43
43
44
-
If your `app_location` is not the repository root `./` but `./my_app_location`, then you also need to change the `api_location` to `my_app_location/build/server` (but not the `output_location`).
44
+
If your `app_location` is in a subfolder (e.g. `./my_app_location`), then your `api_location` should include the path to that subfolder (e.g. `my_app_location/build/server`.) `output_location` should still be `build/static`.
45
45
46
46
## Running locally with the Azure SWA CLI
47
47
@@ -187,3 +187,43 @@ This is currently only available when running in production on SWA. In addition,
187
187
### `context`
188
188
189
189
All server requests to your SvelteKit app are handled by an Azure function. This property contains that Azure function's [request context](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node#context-object).
190
+
191
+
## Monorepo support
192
+
193
+
If you're deploying your app from a monorepo, here's what you need to know.
194
+
195
+
The build currently fails if you use `pnpm` as a package manager. You can track [this issue](https://github.com/geoffrich/svelte-adapter-azure-swa/issues/135) for updates. For now, you can work around the issue by using `npm` instead.
196
+
197
+
Also, since your SvelteKit app is in a subfolder of the monorepo, you will need to update your deployment workflow.
198
+
199
+
For instance, if you have the following folder structure:
200
+
201
+
```
202
+
apps/
203
+
├── sveltekit-app
204
+
└── other-app
205
+
```
206
+
207
+
The `app_location` and `api_location` in your deployment configuration need to point to the `apps/sveltekit-app` subfolder. `output_location` should remain the same. Here's how that would look for an Azure SWA GitHub workflow:
0 commit comments