Skip to content

Releases: geoffrich/svelte-adapter-azure-swa

svelte-adapter-azure-swa v0.20.1

13 Jul 23:59
a86dff7
Compare
Choose a tag to compare

Bug Fixes

  • work around SWA issue with empty form bodies (#179) (d14aae1)

svelte-adapter-azure-swa v0.20.0

01 Jan 19:48
9b4d834
Compare
Choose a tag to compare

This version includes breaking changes in required dependencies:

  • Require SvelteKit version 2. See the SvelteKit v2 migration guide first to handle any SvelteKit breaking changes.
  • Require Node 18 or higher. If you previously set platform.apiRuntime to node:18 in the customStaticWebAppConfig, you can remove this setting.
  • Use esbuild 0.19.9 to build the deployed Azure function for SSR

IMPORTANT: since Azure's build system still defaults to Node 16 to build your app, you may need to set the engines field in your package.json to force it to build with Node 18. Node 16 is EOL and is not supported by SvelteKit v2.

Features

  • require SvelteKit 2 and Node 18 (c77c842)

svelte-adapter-azure-swa v0.19.1

20 Nov 01:09
Compare
Choose a tag to compare

Bug Fixes

  • do not rewrite /api and /data-api requests to SvelteKit (#162) (aa36771)
  • do not throw on parsing client principal (#160) (0fe3eaa)

svelte-adapter-azure-swa v0.19.0

17 Aug 15:10
1dc3918
Compare
Choose a tag to compare

Features

svelte-adapter-azure-swa v0.18.0

03 Aug 23:01
1b35c22
Compare
Choose a tag to compare

Features

svelte-adapter-azure-swa v0.17.0

02 Jul 22:19
47ca37c
Compare
Choose a tag to compare

This release contains two (likely non-breaking) features.

Allow customizing the node version

In production, your SvelteKit app will run a Node Azure Function to handle server requests. By default, this Azure Function uses Node 16. If you want to customize your Node version (version 18 is in public preview for Azure SWA), you can do so with the customStaticWebAppConfig adapter option to set platform.apiRuntime.

// svelte.config.js
import adapter from 'svelte-adapter-azure-swa';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: adapter({
			customStaticWebAppConfig: {
				platform: {
					apiRuntime: 'node:18'
				}
			}
		})
	}
};

export default config;

Throw an error during build if the app declares /api routes

In production, Azure SWA will handle any request to routes starting with /api. If you also declare SvelteKit routes starting with /api, they will not be reachable in production and hitting them returns confusing errors (see #89 and #78 for context).

Because this, the adapter will now throw an error at build time and instruct you to rename the routes. If you do want to allow these routes for some reason, you can set allowReservedSwaRoutes in your adapter options. However, this will not start routing /api requests to your SvelteKit app, since SWA does not allow configuring the /api route.

Features

svelte-adapter-azure-swa v0.16.0

12 May 19:16
56a380b
Compare
Choose a tag to compare

Features

svelte-adapter-azure-swa v0.15.0

20 Mar 14:40
cd30083
Compare
Choose a tag to compare

Features

Bug Fixes

svelte-adapter-azure-swa v0.14.0

15 Mar 14:56
496d30c
Compare
Choose a tag to compare

Features

  • expose client principal through platform (#107) (e41f89c)

Bug Fixes

  • binary body is incorrectly parsed as UTF-8 (#123) (4869959)

svelte-adapter-azure-swa v0.13.0

23 Jan 03:22
Compare
Choose a tag to compare

This release bumps the SvelteKit peer dependency to 1.0. If you are on a pre-1.0 version of SvelteKit, you will need to update to use further releases of this adapter.

If you are already on SvelteKit 1.0, you shouldn't need to make any changes to update to this release.

Features

  • bump deps to SvelteKit 1.0 (d050933)