Repository: sveltejs/kit
Pull request #8321 (2023-01-03 06:10:14)

[docs] add an FAQ regarding separate backend
I also moved the middleware FAQ down a bit as it discusses a less common need

changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: 2d2efb233099e374ea74c1d74ebea5608a019e1f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/sveltejs/kit/new/backend-faq?filename=.changeset/purple-mirrors-dress.md&value=---%0A%0A---%0A%0A%5Bdocs%5D%20add%20an%20FAQ%20regarding%20separate%20backend%0A)



Patch:
diff --git a/.changeset/chilly-maps-worry.md b/.changeset/chilly-maps-worry.md
deleted file mode 100644
index c8c1a5a53..000000000
--- a/.changeset/chilly-maps-worry.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@sveltejs/adapter-cloudflare-workers': patch
----
-
-[chore] update @cloudflare/kv-asset-handler
diff --git a/.changeset/large-ravens-attack.md b/.changeset/large-ravens-attack.md
deleted file mode 100644
index 60cd95f58..000000000
--- a/.changeset/large-ravens-attack.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-"@sveltejs/adapter-node": patch
----
-
-Update dependency @rollup/plugin-json to v6
-
-Note: plugin-json v6 fails your build for parse errors that only logged a warning with v5. We consider this a bugfix as only healthy input should result in a successful build.
diff --git a/.changeset/quick-mice-hope.md b/.changeset/quick-mice-hope.md
deleted file mode 100644
index 05db2c29b..000000000
--- a/.changeset/quick-mice-hope.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@sveltejs/package': patch
----
-
-[chore] update svelte2tsx
diff --git a/.changeset/rare-frogs-crash.md b/.changeset/rare-frogs-crash.md
deleted file mode 100644
index cf0bec2f5..000000000
--- a/.changeset/rare-frogs-crash.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"create-svelte": patch
----
-
-[fix] address flakiness in playwright test
diff --git a/.changeset/sour-comics-dress.md b/.changeset/sour-comics-dress.md
deleted file mode 100644
index 58a76da84..000000000
--- a/.changeset/sour-comics-dress.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@sveltejs/adapter-node": patch
----
-
-chore(deps): update dependency @rollup/plugin-commonjs to v24
diff --git a/.changeset/tidy-pandas-report.md b/.changeset/tidy-pandas-report.md
deleted file mode 100644
index d328468ff..000000000
--- a/.changeset/tidy-pandas-report.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@sveltejs/kit': patch
----
-
-Fix form action redirect status code
diff --git a/.changeset/tricky-foxes-buy.md b/.changeset/tricky-foxes-buy.md
new file mode 100644
index 000000000..b2a84c4e5
--- /dev/null
+++ b/.changeset/tricky-foxes-buy.md
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': patch
+---
+
+Include submitter's value when progressively enhancing `<form method="get">`
diff --git a/documentation/docs/10-getting-started/10-introduction.md b/documentation/docs/10-getting-started/10-introduction.md
index a6a447628..613adbab9 100644
--- a/documentation/docs/10-getting-started/10-introduction.md
+++ b/documentation/docs/10-getting-started/10-introduction.md
@@ -10,10 +10,16 @@ title: Introduction
 
 ## What is SvelteKit?
 
-SvelteKit is a framework for rapid development of robust, performant web applications.
+SvelteKit is a framework for rapidly developing robust, performant web applications using [Svelte](https://svelte.dev/).
 
-Building an app with all the modern best practices is fiendishly complicated. Those practices include [build optimizations](https://vitejs.dev/guide/features.html#build-optimizations), so that you load only the minimal required code; [offline support](/docs/service-workers); [preloading](/docs/link-options#data-sveltekit-preload-data) pages before the user initiates navigation; [configurable rendering](/docs/page-options) that allows you to render your app [on the server](/docs/glossary#ssr) or [in the browser](/docs/glossary#csr-and-spa) at runtime or [at build-time](/docs/glossary#prerendering); and many other things. SvelteKit does all the boring stuff for you so that you can get on with the creative part.
+## What is Svelte?
 
-It uses [Vite](https://vitejs.dev/) with a [Svelte plugin](https://github.com/sveltejs/vite-plugin-svelte) to provide a lightning-fast and feature-rich development experience with [Hot Module Replacement (HMR)](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#hot), where changes to your code are reflected in the browser instantly.
+In short, Svelte is a way of writing user interface components — like a navigation bar, comment section, or contact form — that users see and interact with in their browsers. The Svelte compiler converts your components to JavaScript that can be run to render the HTML for the page and to CSS that styles the page. You don't need to know Svelte to understand the rest of this guide, but it will help. If you'd like to learn more, check out [the Svelte tutorial](https://svelte.dev/tutorial).
+
+## What does SvelteKit provide on top of Svelte?
+
+Svelte renders UI components. You can compose these components and render an entire page with just Svelte, but you need more than just Svelte to write an entire app.
 
-You don't need to know Svelte to understand the rest of this guide, but it will help. In short, it's a UI framework that compiles your components to highly optimized vanilla JavaScript. Read the [introduction to Svelte blog post](https://svelte.dev/blog/svelte-3-rethinking-reactivity) and the [Svelte tutorial](https://svelte.dev/tutorial) to learn more.
+SvelteKit provides basic functionality like a [router](/docs/glossary#routing) — which updates the UI when a link is clicked — and [server-side rendering (SSR)](/docs/glossary#ssr). But beyond that, building an app with all the modern best practices is fiendishly complicated. Those practices include [build optimizations](https://vitejs.dev/guide/features.html#build-optimizations), so that you load only the minimal required code; [offline support](/docs/service-workers); [preloading](/docs/link-options#data-sveltekit-preload-data) pages before the user initiates navigation; [configurable rendering](/docs/page-options) that allows you to render different parts of your app on the server with [SSR](/docs/glossary#ssr), in the browser [client-side rendering](/docs/glossary#csr-and-spa), or at build-time with [prerendering](/docs/glossary#prerendering); and many other things. SvelteKit does all the boring stuff for you so that you can get on with the creative part.
+
+It uses [Vite](https://vitejs.dev/) with a [Svelte plugin](https://github.com/sveltejs/vite-plugin-svelte) to provide a lightning-fast and feature-rich development experience with [Hot Module Replacement (HMR)](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#hot), where changes to your code are reflected in the browser instantly.
diff --git a/documentation/docs/20-core-concepts/20-load.md b/documentation/docs/20-core-concepts/20-load.md
index 97c9c5f37..a4f8d9561 100644
--- a/documentation/docs/20-core-concepts/20-load.md
+++ b/documentation/docs/20-core-concepts/20-load.md
@@ -90,9 +90,8 @@ export async function load() {
 </script>
 
 <main>
-	<slot>
-		<!-- +page.svelte is rendered here -->
-	</slot>
+	<!-- +page.svelte is rendered in this <slot> -->
+	<slot />
 </main>
 
 <aside>
@@ -422,7 +421,7 @@ Top-level promises will be awaited, which makes it easy to return multiple promi
 
 ```js
 /// file: src/routes/+page.js
-/** @type {import('./$types').PageServerLoad} */
+/** @type {import('./$types').PageLoad} */
 export function load() {
 	return {
 		a: Promise.resolve('a'),
diff --git a/documentation/docs/30-advanced/10-advanced-routing.md b/documentation/docs/30-advanced/10-advanced-routing.md
index f703d1719..e227edfac 100644
--- a/documentation/docs/30-advanced/10-advanced-routing.md
+++ b/documentation/docs/30-advanced/10-advanced-routing.md
@@ -98,7 +98,7 @@ It's possible for multiple routes to match a given path. For example each of the
 
 ```bash
 src/routes/[...catchall]/+page.svelte
-src/routes/[[a]]/foo/+page.svelte
+src/routes/[[a=x]]/+page.svelte
 src/routes/[b]/+page.svelte
 src/routes/foo-[c]/+page.svelte
 src/routes/foo-abc/+page.svelte
@@ -116,7 +116,7 @@ SvelteKit needs to know which route is being requested. To do so, it sorts them
 ```bash
 src/routes/foo-abc/+page.svelte
 src/routes/foo-[c]/+page.svelte
-src/routes/[[a]]/foo/+page.svelte
+src/routes/[[a=x]]/+page.svelte
 src/routes/[b]/+page.svelte
 src/routes/[...catchall]/+page.svelte
 ```
diff --git a/documentation/docs/30-advanced/20-hooks.md b/documentation/docs/30-advanced/20-hooks.md
index 39eb6710f..1e9d50e92 100644
--- a/documentation/docs/30-advanced/20-hooks.md
+++ b/documentation/docs/30-advanced/20-hooks.md
@@ -99,7 +99,7 @@ Or your `load` function might make a request to a public URL like `https://api.y
 ```js
 /// file: src/hooks.server.js
 /** @type {import('@sveltejs/kit').HandleFetch} */
-export async function handleFetch({ request, fetch }) {
+export function handleFetch({ request, fetch }) {
 	if (request.url.startsWith('https://api.yourapp.com/')) {
 		// clone the original request, but change the URL
 		request = new Request(
@@ -124,7 +124,7 @@ If your app and your API are on sibling subdomains — `www.my-domain.com` and `
 /// file: src/hooks.server.js
 // @errors: 2345
 /** @type {import('@sveltejs/kit').HandleFetch} */
-export async function handleFetch({ event, request, fetch }) {
+export function handleFetch({ event, request, fetch }) {
 	if (request.url.startsWith('https://api.my-domain.com/')) {
 		request.headers.set('cookie', event.request.headers.get('cookie'));
 	}
@@ -160,12 +160,18 @@ declare namespace App {
 /// file: src/hooks.server.js
 // @errors: 2322
 // @filename: ambient.d.ts
-const Sentry: any;
+declare module '@sentry/node' {
+	export const init: (opts: any) => void;
+	export const captureException: (error: any, opts: any) => void;
+}
 
 // @filename: index.js
 // ---cut---
+import * as Sentry from '@sentry/node';
 import crypto from 'crypto';
 
+Sentry.init({/*...*/})
+
 /** @type {import('@sveltejs/kit').HandleServerError} */
 export function handleError({ error, event }) {
 	const errorId = crypto.randomUUID();
@@ -183,10 +189,17 @@ export function handleError({ error, event }) {
 /// file: src/hooks.client.js
 // @errors: 2322
 // @filename: ambient.d.ts
-const Sentry: any;
+declare module '@sentry/svelte' {
+	export const init: (opts: any) => void;
+	export const captureException: (error: any, opts: any) => void;
+}
 
 // @filename: index.js
 // ---cut---
+import * as Sentry from '@sentry/svelte';
+
+Sentry.init({/*...*/})
+
 /** @type {import('@sveltejs/kit').HandleClientError} */
 export function handleError({ error, event }) {
 	const errorId = crypto.randomUUID();
diff --git a/documentation/docs/30-advanced/25-errors.md b/documentation/docs/30-advanced/25-errors.md
index 331a992d3..40ac2269e 100644
--- a/documentation/docs/30-advanced/25-errors.md
+++ b/documentation/docs/30-advanced/25-errors.md
@@ -8,7 +8,7 @@ Errors are an inevitable fact of software development. SvelteKit handles errors
 
 SvelteKit distinguishes between expected and unexpected errors, both of which are represented as simple `{ message: string }` objects by default.
 
-You can add additional properties, like a `code` or a tracking `id`, as shown below.
+You can add additional properties, like a `code` or a tracking `id`, as shown in the examples below. (When using TypeScript this requires you to redefine the `Error` type as described in  [type safety](/docs/errors#type-safety)).
 
 ## Expected errors
 
@@ -83,10 +83,17 @@ Unexpected errors will go through the [`handleError`](/docs/hooks#shared-hooks-h
 /// file: src/hooks.server.js
 // @errors: 2322 1360 2571 2339
 // @filename: ambient.d.ts
-const Sentry: any;
+declare module '@sentry/node' {
+	export const init: (opts: any) => void;
+	export const captureException: (error: any, opts: any) => void;
+}
 
 // @filename: index.js
 // ---cut---
+import * as Sentry from '@sentry/node';
+
+Sentry.init({/*...*/})
+
 /** @type {import('@sveltejs/kit').HandleServerError} */
 export function handleError({ error, event }) {
 	// example integration with https://sentry.io/
@@ -140,4 +147,4 @@ declare namespace App {
 }
 ```
 
-This interface always includes a `message: string` property.
\ No newline at end of file
+This interface always includes a `message: string` property.
diff --git a/documentation/faq/70-packages.md b/documentation/faq/70-packages.md
index 6c7a1fd9c..1eebf3f4a 100644
--- a/documentation/faq/70-packages.md
+++ b/documentation/faq/70-packages.md
@@ -2,15 +2,15 @@
 title: How do I fix the error I'm getting trying to include a package?
 ---
 
-Vite's SSR support has become fairly stable since Vite 2.7. Most issues related to including a library are due to incorrect packaging.
+Most issues related to including a library are due to incorrect packaging. You can check if a library's packaging is compatible with Node.js by entering it into [the publint website](https://publint.dev/).
 
-Libraries work best with Vite when they distribute an ESM version and you may wish to suggest this to library authors. Here are a few things to keep in mind when checking if a library is packaged correctly:
+Here are a few things to keep in mind when checking if a library is packaged correctly:
 
 - `exports` takes precedence over the other entry point fields such as `main` and `module`. Adding an `exports` field may not be backwards-compatible as it prevents deep imports.
 - ESM files should end with `.mjs` unless `"type": "module"` is set in which any case CommonJS files should end with `.cjs`.
 - `main` should be defined if `exports` is not. It should be either a CommonJS or ESM file and adhere to the previous bullet. If a `module` field is defined, it should refer to an ESM file.
-- Svelte components should be distributed entirely as ESM and have a `svelte` field defining the entry point.
+- Svelte components should be distributed as uncompiled `.svelte` files with any JS in the package written as ESM only. Custom script and style languages, like TypeScript and SCSS, should be preprocessed as vanilla JS and CSS respectively. We recommend using [`svelte-package`](/docs/packaging) for packaging Svelte libraries, which will do this for you.
 
-It is encouraged to make sure the dependencies of external Svelte components provide an ESM version. However, in order to handle CommonJS dependencies [`vite-plugin-svelte` will look for any CJS dependencies of external Svelte components](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies) and ask Vite to pre-bundle them by automatically adding them to Vite's `optimizeDeps.include` which will use `esbuild` to convert them to ESM. A side effect of this approach is that it takes longer to load the initial page. If this becomes noticeable, try setting [experimental.prebundleSvelteLibraries: true](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#prebundlesveltelibraries) in `svelte.config.js`. Note that this option is experimental.
+Libraries work best in the browser with Vite when they distribute an ESM version, especially if they are dependencies of a Svelte component library. You may wish to suggest to library authors that they provide an ESM version. However, CommonJS (CJS) dependencies should work as well since, by default, [`vite-plugin-svelte` will ask Vite to pre-bundle them](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies) using `esbuild` to convert them to ESM.
 
-If you are still encountering issues we recommend checking [the list of known Vite issues most commonly affecting SvelteKit users](https://github.com/sveltejs/kit/issues/2086) and searching both [the Vite issue tracker](https://github.com/vitejs/vite/issues) and the issue tracker of the library in question. Sometimes issues can be worked around by fiddling with the [`optimizeDeps`](https://vitejs.dev/config/#dep-optimization-options) or [`ssr`](https://vitejs.dev/config/#ssr-options) config values.
+If you are still encountering issues we recommend searching both [the Vite issue tracker](https://github.com/vitejs/vite/issues) and the issue tracker of the library in question. Sometimes issues can be worked around by fiddling with the [`optimizeDeps`](https://vitejs.dev/config/#dep-optimization-options) or [`ssr`](https://vitejs.dev/config/#ssr-options) config values though we recommend this as only a short-term workaround in favor of fixing the library in question.
diff --git a/documentation/faq/80-integrations.md b/documentation/faq/80-integrations.md
index 94ee0f84e..c05453258 100644
--- a/documentation/faq/80-integrations.md
+++ b/documentation/faq/80-integrations.md
@@ -8,39 +8,6 @@ Make sure you've read the [documentation section on integrations](/docs/integrat
 
 Put the code to query your database in a [server route](/docs/routing#server) - don't query the database in .svelte files. You can create a `db.js` or similar that sets up a connection immediately and makes the client accessible throughout the app as a singleton. You can execute any one-time setup code in `hooks.js` and import your database helpers into any endpoint that needs them.
 
-### How do I use middleware?
-
-`adapter-node` builds a middleware that you can use with your own server for production mode. In dev, you can add middleware to Vite by using a Vite plugin. For example:
-
-```js
-// @filename: ambient.d.ts
-declare module '@sveltejs/kit/vite'; // TODO this feels unnecessary, why can't it 'see' the declarations?
-
-// @filename: index.js
-// ---cut---
-import { sveltekit } from '@sveltejs/kit/vite';
-
-/** @type {import('vite').Plugin} */
-const myPlugin = {
-	name: 'log-request-middleware',
-	configureServer(server) {
-		server.middlewares.use((req, res, next) => {
-			console.log(`Got request ${req.url}`);
-			next();
-		});
-	}
-};
-
-/** @type {import('vite').UserConfig} */
-const config = {
-	plugins: [myPlugin, sveltekit()]
-};
-
-export default config;
-```
-
-See [Vite's `configureServer` docs](https://vitejs.dev/guide/api-plugin.html#configureserver) for more details including how to control ordering.
-
 ### How do I use a client-side only library that depends on `document` or `window`?
 
 If you need access to the `document` or `window` variables or otherwise need code to run only on the client-side you can wrap it in a `browser` check:
@@ -106,6 +73,56 @@ onMount(() => {
 });
 ```
 
+### How do I use a different backend API server?
+
+You can use [`event.fetch`](/docs/load#making-fetch-requests) to request data from an external API server, but be aware that you would need to deal with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), which will result in complications such as generally requiring requests to be preflighted resulting in higher latency. Requests to a separate subdomain may also increase latency due to an additional DNS lookup, TLS setup, etc. If you wish to use this method, you may find [`handleFetch`](/docs/hooks#server-hooks-handlefetch) helpful.
+
+Another approach is to set up a proxy to bypass CORS headaches. In production, you would rewrite a path like `/api` to the API server; for local development, use Vite's [`server.proxy`](https://vitejs.dev/config/server-options.html#server-proxy) option.
+
+How to setup rewrites in production will depend on your deployment platform. If rewrites aren't an option, you could alternatively add an [API route](https://kit.svelte.dev/docs/routing#server):
+
+```js
+// src/routes/api/[...path]/+server.js
+export function GET({ params, url }) {
+	return fetch(`https://my-api-server.com/${params.path + url.search}`);
+}
+```
+
+(Note that you may also need to proxy `POST`/`PATCH` etc requests, and forward `request.headers`, depending on your needs.)
+
+### How do I use middleware?
+
+`adapter-node` builds a middleware that you can use with your own server for production mode. In dev, you can add middleware to Vite by using a Vite plugin. For example:
+
+```js
+// @filename: ambient.d.ts
+declare module '@sveltejs/kit/vite'; // TODO this feels unnecessary, why can't it 'see' the declarations?
+
+// @filename: index.js
+// ---cut---
+import { sveltekit } from '@sveltejs/kit/vite';
+
+/** @type {import('vite').Plugin} */
+const myPlugin = {
+	name: 'log-request-middleware',
+	configureServer(server) {
+		server.middlewares.use((req, res, next) => {
+			console.log(`Got request ${req.url}`);
+			next();
+		});
+	}
+};
+
+/** @type {import('vite').UserConfig} */
+const config = {
+	plugins: [myPlugin, sveltekit()]
+};
+
+export default config;
+```
+
+See [Vite's `configureServer` docs](https://vitejs.dev/guide/api-plugin.html#configureserver) for more details including how to control ordering.
+
 ### Does it work with Yarn 2?
 
 Sort of. The Plug'n'Play feature, aka 'pnp', is broken (it deviates from the Node module resolution algorithm, and [doesn't yet work with native JavaScript modules](https://github.com/yarnpkg/berry/issues/638) which SvelteKit — along with an [increasing number of packages](https://blog.sindresorhus.com/get-ready-for-esm-aa53530b3f77) — uses). You can use `nodeLinker: 'node-modules'` in your [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) file to disable pnp, but it's probably easier to just use npm or [pnpm](https://pnpm.io/), which is similarly fast and efficient but without the compatibility headaches.
diff --git a/package.json b/package.json
index 17cd828cd..955239522 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
 		"turbo": "^1.6.3",
 		"typescript": "^4.9.4"
 	},
-	"packageManager": "pnpm@7.21.0",
+	"packageManager": "pnpm@7.22.0",
 	"engines": {
 		"pnpm": "^7.0.0"
 	},
diff --git a/packages/adapter-cloudflare-workers/CHANGELOG.md b/packages/adapter-cloudflare-workers/CHANGELOG.md
index 08157eb56..852ee63c0 100644
--- a/packages/adapter-cloudflare-workers/CHANGELOG.md
+++ b/packages/adapter-cloudflare-workers/CHANGELOG.md
@@ -1,5 +1,14 @@
 # @sveltejs/adapter-cloudflare-workers
 
+## 1.0.1
+
+### Patch Changes
+
+- [chore] update @cloudflare/kv-asset-handler ([`30e1130e`](https://github.com/sveltejs/kit/commit/30e1130ef84e56a77be5cb1136d5c53edef6e5f9))
+
+- Updated dependencies [[`fab0de4f`](https://github.com/sveltejs/kit/commit/fab0de4f06ac5b1e9b049e106889b193975c1c29), [`89b8d94b`](https://github.com/sveltejs/kit/commit/89b8d94b1b20d586e1ca525c30d07587c3f2d8f2)]:
+  - @sveltejs/kit@1.0.2
+
 ## 1.0.0
 
 ### Major Changes
diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json
index d7195b467..0c30adeae 100644
--- a/packages/adapter-cloudflare-workers/package.json
+++ b/packages/adapter-cloudflare-workers/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@sveltejs/adapter-cloudflare-workers",
-	"version": "1.0.0",
+	"version": "1.0.1",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
diff --git a/packages/adapter-node/CHANGELOG.md b/packages/adapter-node/CHANGELOG.md
index 80ca82f61..3842b7886 100644
--- a/packages/adapter-node/CHANGELOG.md
+++ b/packages/adapter-node/CHANGELOG.md
@@ -1,5 +1,18 @@
 # @sveltejs/adapter-node
 
+## 1.0.1
+
+### Patch Changes
+
+- Update dependency @rollup/plugin-json to v6 ([#8204](https://github.com/sveltejs/kit/pull/8204))
+
+  Note: plugin-json v6 fails your build for parse errors that only logged a warning with v5. We consider this a bugfix as only healthy input should result in a successful build.
+
+- chore(deps): update dependency @rollup/plugin-commonjs to v24 ([#8216](https://github.com/sveltejs/kit/pull/8216))
+
+- Updated dependencies [[`fab0de4f`](https://github.com/sveltejs/kit/commit/fab0de4f06ac5b1e9b049e106889b193975c1c29), [`89b8d94b`](https://github.com/sveltejs/kit/commit/89b8d94b1b20d586e1ca525c30d07587c3f2d8f2)]:
+  - @sveltejs/kit@1.0.2
+
 ## 1.0.0
 
 ### Major Changes
diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json
index dbbe91e4f..969a9b2ab 100644
--- a/packages/adapter-node/package.json
+++ b/packages/adapter-node/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@sveltejs/adapter-node",
-	"version": "1.0.0",
+	"version": "1.0.1",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json
index 47949a5e3..20f917c54 100644
--- a/packages/adapter-static/package.json
+++ b/packages/adapter-static/package.json
@@ -31,7 +31,7 @@
 		"svelte": "^3.55.0",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"peerDependencies": {
 		"@sveltejs/kit": "^1.0.0"
diff --git a/packages/create-svelte/CHANGELOG.md b/packages/create-svelte/CHANGELOG.md
index 3f74ac1d2..6b4d4a3a7 100644
--- a/packages/create-svelte/CHANGELOG.md
+++ b/packages/create-svelte/CHANGELOG.md
@@ -1,5 +1,11 @@
 # create-svelte
 
+## 2.0.2
+
+### Patch Changes
+
+- [fix] address flakiness in playwright test ([#8162](https://github.com/sveltejs/kit/pull/8162))
+
 ## 2.0.1
 
 ### Patch Changes
diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json
index 28355f820..f3ba2889d 100644
--- a/packages/create-svelte/package.json
+++ b/packages/create-svelte/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "create-svelte",
-	"version": "2.0.1",
+	"version": "2.0.2",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
diff --git a/packages/kit/CHANGELOG.md b/packages/kit/CHANGELOG.md
index e1a361713..f9b25fde6 100644
--- a/packages/kit/CHANGELOG.md
+++ b/packages/kit/CHANGELOG.md
@@ -1,5 +1,13 @@
 # @sveltejs/kit
 
+## 1.0.2
+
+### Patch Changes
+
+- Fix filterSerializedResponseHeaders error message ([#8348](https://github.com/sveltejs/kit/pull/8348))
+
+- Fix form action redirect status code ([#8210](https://github.com/sveltejs/kit/pull/8210))
+
 ## 1.0.1
 
 ### Patch Changes
diff --git a/packages/kit/package.json b/packages/kit/package.json
index 5bce20566..1418c0e3d 100644
--- a/packages/kit/package.json
+++ b/packages/kit/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@sveltejs/kit",
-	"version": "1.0.1",
+	"version": "1.0.2",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
@@ -38,7 +38,7 @@
 		"svelte-preprocess": "^5.0.0",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"peerDependencies": {
 		"svelte": "^3.54.0",
diff --git a/packages/kit/src/runtime/client/client.js b/packages/kit/src/runtime/client/client.js
index ea1a1a6bf..c85004811 100644
--- a/packages/kit/src/runtime/client/client.js
+++ b/packages/kit/src/runtime/client/client.js
@@ -1461,21 +1461,28 @@ export function create_client({ target, base }) {
 				if (method !== 'get') return;
 
 				const url = new URL(
-					(event.submitter?.hasAttribute('formaction') && submitter?.formAction) || form.action
+					(submitter?.hasAttribute('formaction') && submitter?.formAction) || form.action
 				);
 
 				if (is_external_url(url, base)) return;
 
-				const { noscroll, reload } = get_router_options(
-					/** @type {HTMLFormElement} */ (event.target)
-				);
+				const event_form = /** @type {HTMLFormElement} */ (event.target);
+
+				const { noscroll, reload } = get_router_options(event_form);
 				if (reload) return;
 
 				event.preventDefault();
 				event.stopPropagation();
 
+				const data = new FormData(event_form);
+
+				const submitter_name = submitter?.getAttribute('name');
+				if (submitter_name) {
+					data.append(submitter_name, submitter?.getAttribute('value') ?? '');
+				}
+
 				// @ts-expect-error `URLSearchParams(fd)` is kosher, but typescript doesn't know that
-				url.search = new URLSearchParams(new FormData(event.target)).toString();
+				url.search = new URLSearchParams(data).toString();
 
 				navigate({
 					url,
diff --git a/packages/kit/src/runtime/server/page/load_data.js b/packages/kit/src/runtime/server/page/load_data.js
index 99735c2e4..f5f20c44f 100644
--- a/packages/kit/src/runtime/server/page/load_data.js
+++ b/packages/kit/src/runtime/server/page/load_data.js
@@ -211,7 +211,7 @@ export async function load_data({
 						const included = resolve_opts.filterSerializedResponseHeaders(lower, value);
 						if (!included) {
 							throw new Error(
-								`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://kit.svelte.dev/docs/hooks#server-hooks-handle (at ${event.route})`
+								`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://kit.svelte.dev/docs/hooks#server-hooks-handle (at ${event.route.id})`
 							);
 						}
 					}
diff --git a/packages/package/CHANGELOG.md b/packages/package/CHANGELOG.md
index 20101aaed..0a941c823 100644
--- a/packages/package/CHANGELOG.md
+++ b/packages/package/CHANGELOG.md
@@ -1,5 +1,11 @@
 # @sveltejs/package
 
+## 1.0.2
+
+### Patch Changes
+
+- [chore] update svelte2tsx ([`50a3c5a6`](https://github.com/sveltejs/kit/commit/50a3c5a6d1282c64422e80fe19b352c14e41c853))
+
 ## 1.0.1
 
 ### Patch Changes
diff --git a/packages/package/package.json b/packages/package/package.json
index b5085cbcc..5d3ef3783 100644
--- a/packages/package/package.json
+++ b/packages/package/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@sveltejs/package",
-	"version": "1.0.1",
+	"version": "1.0.2",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6d4f65e40..ec26cfaae 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -147,7 +147,7 @@ importers:
       svelte: ^3.55.0
       typescript: ^4.9.4
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../kit
       '@types/node': 16.18.6
@@ -155,17 +155,17 @@ importers:
       svelte: 3.55.0
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0_@types+node@16.18.6
+      vite: 4.0.4_@types+node@16.18.6
 
   packages/adapter-static/test/apps/prerendered:
     specifiers:
       '@sveltejs/kit': workspace:^
       svelte: ^3.55.0
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../../kit
       svelte: 3.55.0
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/adapter-static/test/apps/spa:
     specifiers:
@@ -173,13 +173,13 @@ importers:
       '@sveltejs/kit': workspace:^
       sirv-cli: ^2.0.2
       svelte: ^3.55.0
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/adapter-node': link:../../../../adapter-node
       '@sveltejs/kit': link:../../../../kit
       sirv-cli: 2.0.2
       svelte: 3.55.0
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/adapter-vercel:
     specifiers:
@@ -247,7 +247,7 @@ importers:
       '@sveltejs/kit': link:../../../kit
       svelte: 3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/create-svelte/templates/skeleton:
     specifiers:
@@ -283,9 +283,9 @@ importers:
       typescript: ^4.9.4
       undici: 5.14.0
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
     dependencies:
-      '@sveltejs/vite-plugin-svelte': 2.0.0_svelte@3.55.0+vite@4.0.0
+      '@sveltejs/vite-plugin-svelte': 2.0.0_svelte@3.55.0+vite@4.0.4
       '@types/cookie': 0.5.1
       cookie: 0.5.0
       devalue: 4.2.0
@@ -312,7 +312,7 @@ importers:
       svelte-preprocess: 5.0.0_niwyv7xychq2ag6arq5eqxbomm
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0_@types+node@16.18.6
+      vite: 4.0.4_@types+node@16.18.6
 
   packages/kit/test/apps/amp:
     specifiers:
@@ -323,7 +323,7 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/amp': link:../../../../amp
       '@sveltejs/kit': link:../../..
@@ -332,7 +332,7 @@ importers:
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/apps/basics:
     specifiers:
@@ -342,7 +342,7 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
@@ -350,7 +350,7 @@ importers:
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/apps/dev-only:
     specifiers:
@@ -360,7 +360,7 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
@@ -368,7 +368,7 @@ importers:
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/apps/options:
     specifiers:
@@ -377,14 +377,14 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/apps/options-2:
     specifiers:
@@ -394,7 +394,7 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/adapter-node': link:../../../../adapter-node
       '@sveltejs/kit': link:../../..
@@ -402,7 +402,7 @@ importers:
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/apps/writes:
     specifiers:
@@ -412,7 +412,7 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
@@ -420,7 +420,7 @@ importers:
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors:
     specifiers:
@@ -435,14 +435,14 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.7.1
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/adapter-auto': link:../../../../../adapter-auto
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/prerenderable-not-prerendered:
     specifiers:
@@ -451,14 +451,14 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/adapter-auto': link:../../../../../adapter-auto
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/private-dynamic-env:
     specifiers:
@@ -466,13 +466,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import:
     specifiers:
@@ -480,13 +480,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/private-static-env:
     specifiers:
@@ -495,14 +495,14 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       cross-env: 7.0.3
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/private-static-env-dynamic-import:
     specifiers:
@@ -510,13 +510,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/server-only-folder:
     specifiers:
@@ -524,13 +524,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/server-only-folder-dynamic-import:
     specifiers:
@@ -538,13 +538,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/server-only-module:
     specifiers:
@@ -552,13 +552,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/build-errors/apps/server-only-module-dynamic-import:
     specifiers:
@@ -566,13 +566,13 @@ importers:
       svelte: ^3.55.0
       svelte-check: ^2.9.2
       typescript: ^4.9.4
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/prerendering/basics:
     specifiers:
@@ -581,14 +581,14 @@ importers:
       svelte-check: ^2.9.2
       typescript: ^4.9.4
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/prerendering/options:
     specifiers:
@@ -597,14 +597,14 @@ importers:
       svelte-check: ^2.9.2
       typescript: ^4.9.4
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/prerendering/paths-base:
     specifiers:
@@ -613,14 +613,14 @@ importers:
       svelte-check: ^2.9.2
       typescript: ^4.9.4
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/kit/test/prerendering/ssr-false:
     specifiers:
@@ -629,14 +629,14 @@ importers:
       svelte-check: ^2.9.2
       typescript: ^4.9.4
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
     devDependencies:
       '@sveltejs/kit': link:../../..
       svelte: 3.55.0
       svelte-check: 2.9.2_svelte@3.55.0
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0
+      vite: 4.0.4
 
   packages/migrate:
     specifiers:
@@ -704,7 +704,7 @@ importers:
       topojson-client: ^3.1.0
       typescript: ^4.9.4
       uvu: ^0.5.6
-      vite: ^4.0.0
+      vite: ^4.0.4
       vite-imagetools: ^4.0.13
     dependencies:
       d3-geo: 3.0.1
@@ -728,7 +728,7 @@ importers:
       tiny-glob: 0.2.9
       typescript: 4.9.4
       uvu: 0.5.6
-      vite: 4.0.0_@types+node@16.18.6
+      vite: 4.0.4_@types+node@16.18.6
       vite-imagetools: 4.0.13
 
 packages:
@@ -1331,7 +1331,7 @@ packages:
     resolution: {integrity: sha512-zetnU9jGOu+DYcwqpgK9uSUv3qrGrL7JagMN7M8B4bQRoBq1lAPnCvBXtlfQckvkQLtH453JJTIX6ULqL1xtpA==}
     dev: true
 
-  /@sveltejs/vite-plugin-svelte/2.0.0_svelte@3.55.0+vite@4.0.0:
+  /@sveltejs/vite-plugin-svelte/2.0.0_svelte@3.55.0+vite@4.0.4:
     resolution: {integrity: sha512-oUFrYQarRv4fppmxdrv00qw3wX8Ycdj0uv33MfpRZyR8K67dyxiOcHnqkB0zSy5sDJA8RC/2aNtYhXJ8NINVHQ==}
     engines: {node: ^14.18.0 || >= 16}
     peerDependencies:
@@ -1344,8 +1344,8 @@ packages:
       magic-string: 0.27.0
       svelte: 3.55.0
       svelte-hmr: 0.15.1_svelte@3.55.0
-      vite: 4.0.0_@types+node@16.18.6
-      vitefu: 0.2.3_vite@4.0.0
+      vite: 4.0.4_@types+node@16.18.6
+      vitefu: 0.2.3_vite@4.0.4
     transitivePeerDependencies:
       - supports-color
     dev: false
@@ -3482,8 +3482,8 @@ packages:
       trouter: 3.2.0
     dev: true
 
-  /postcss/8.4.19:
-    resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==}
+  /postcss/8.4.20:
+    resolution: {integrity: sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==}
     engines: {node: ^10 || ^12 || >=14}
     dependencies:
       nanoid: 3.3.4
@@ -4598,8 +4598,8 @@ packages:
       - rollup
     dev: true
 
-  /vite/4.0.0:
-    resolution: {integrity: sha512-ynad+4kYs8Jcnn8J7SacS9vAbk7eMy0xWg6E7bAhS1s79TK+D7tVFGXVZ55S7RNLRROU1rxoKlvZ/qjaB41DGA==}
+  /vite/4.0.4:
+    resolution: {integrity: sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==}
     engines: {node: ^14.18.0 || >=16.0.0}
     hasBin: true
     peerDependencies:
@@ -4624,15 +4624,15 @@ packages:
         optional: true
     dependencies:
       esbuild: 0.16.3
-      postcss: 8.4.19
+      postcss: 8.4.20
       resolve: 1.22.1
       rollup: 3.7.0
     optionalDependencies:
       fsevents: 2.3.2
     dev: true
 
-  /vite/4.0.0_@types+node@16.18.6:
-    resolution: {integrity: sha512-ynad+4kYs8Jcnn8J7SacS9vAbk7eMy0xWg6E7bAhS1s79TK+D7tVFGXVZ55S7RNLRROU1rxoKlvZ/qjaB41DGA==}
+  /vite/4.0.4_@types+node@16.18.6:
+    resolution: {integrity: sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==}
     engines: {node: ^14.18.0 || >=16.0.0}
     hasBin: true
     peerDependencies:
@@ -4658,13 +4658,13 @@ packages:
     dependencies:
       '@types/node': 16.18.6
       esbuild: 0.16.3
-      postcss: 8.4.19
+      postcss: 8.4.20
       resolve: 1.22.1
       rollup: 3.7.0
     optionalDependencies:
       fsevents: 2.3.2
 
-  /vitefu/0.2.3_vite@4.0.0:
+  /vitefu/0.2.3_vite@4.0.4:
     resolution: {integrity: sha512-75l7TTuU8isAhz1QFtNKjDkqjxvndfMC1AfIMjJ0ZQ59ZD0Ow9QOIsJJX16Wv9PS8f+zMzp6fHy5cCbKG/yVUQ==}
     peerDependencies:
       vite: ^3.0.0 || ^4.0.0
@@ -4672,7 +4672,7 @@ packages:
       vite:
         optional: true
     dependencies:
-      vite: 4.0.0_@types+node@16.18.6
+      vite: 4.0.4_@types+node@16.18.6
     dev: false
 
   /vscode-oniguruma/1.6.2:
diff --git a/sites/kit.svelte.dev/package.json b/sites/kit.svelte.dev/package.json
index ab5153577..a9ccf95ed 100644
--- a/sites/kit.svelte.dev/package.json
+++ b/sites/kit.svelte.dev/package.json
@@ -27,7 +27,7 @@
 		"tiny-glob": "^0.2.9",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0",
+		"vite": "^4.0.4",
 		"vite-imagetools": "^4.0.13"
 	},
 	"type": "module",


Test patch:
diff --git a/packages/adapter-static/test/apps/prerendered/package.json b/packages/adapter-static/test/apps/prerendered/package.json
index 2948ecd1b..7c5843545 100644
--- a/packages/adapter-static/test/apps/prerendered/package.json
+++ b/packages/adapter-static/test/apps/prerendered/package.json
@@ -10,7 +10,7 @@
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
 		"svelte": "^3.55.0",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/adapter-static/test/apps/spa/package.json b/packages/adapter-static/test/apps/spa/package.json
index f29595d6b..0df014e58 100644
--- a/packages/adapter-static/test/apps/spa/package.json
+++ b/packages/adapter-static/test/apps/spa/package.json
@@ -12,7 +12,7 @@
 		"@sveltejs/kit": "workspace:^",
 		"sirv-cli": "^2.0.2",
 		"svelte": "^3.55.0",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/apps/amp/package.json b/packages/kit/test/apps/amp/package.json
index f2fd96526..62c624171 100644
--- a/packages/kit/test/apps/amp/package.json
+++ b/packages/kit/test/apps/amp/package.json
@@ -19,7 +19,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/apps/basics/package.json b/packages/kit/test/apps/basics/package.json
index fcb31a869..a3a9ed08a 100644
--- a/packages/kit/test/apps/basics/package.json
+++ b/packages/kit/test/apps/basics/package.json
@@ -18,7 +18,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/apps/basics/src/routes/routing/form-get/+page.svelte b/packages/kit/test/apps/basics/src/routes/routing/form-get/+page.svelte
index f81be9901..32d898350 100644
--- a/packages/kit/test/apps/basics/src/routes/routing/form-get/+page.svelte
+++ b/packages/kit/test/apps/basics/src/routes/routing/form-get/+page.svelte
@@ -11,8 +11,9 @@
 
 <h1>{$page.url.searchParams.get('q') ?? '...'}</h1>
 <h2>{type}</h2>
+<h3>{$page.url.searchParams.get('foo') ?? '...'}</h3>
 
 <form>
 	<input name="q" />
-	<button>submit</button>
+	<button type="submit" name="foo" value="bar">Submit</button>
 </form>
diff --git a/packages/kit/test/apps/basics/test/client.test.js b/packages/kit/test/apps/basics/test/client.test.js
index 6a91def2d..82dc87df0 100644
--- a/packages/kit/test/apps/basics/test/client.test.js
+++ b/packages/kit/test/apps/basics/test/client.test.js
@@ -844,6 +844,7 @@ test.describe('Routing', () => {
 		await page.goto('/routing/form-get');
 		expect(await page.textContent('h1')).toBe('...');
 		expect(await page.textContent('h2')).toBe('enter');
+		expect(await page.textContent('h3')).toBe('...');
 
 		const requests = [];
 		page.on('request', (request) => requests.push(request.url()));
@@ -854,6 +855,7 @@ test.describe('Routing', () => {
 		expect(requests).toEqual([]);
 		expect(await page.textContent('h1')).toBe('updated');
 		expect(await page.textContent('h2')).toBe('form');
+		expect(await page.textContent('h3')).toBe('bar');
 	});
 });
 
diff --git a/packages/kit/test/apps/dev-only/package.json b/packages/kit/test/apps/dev-only/package.json
index 0dceef48e..17201325b 100644
--- a/packages/kit/test/apps/dev-only/package.json
+++ b/packages/kit/test/apps/dev-only/package.json
@@ -16,7 +16,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/apps/options-2/package.json b/packages/kit/test/apps/options-2/package.json
index 0665d55c8..94ff1c399 100644
--- a/packages/kit/test/apps/options-2/package.json
+++ b/packages/kit/test/apps/options-2/package.json
@@ -18,7 +18,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/apps/options/package.json b/packages/kit/test/apps/options/package.json
index 09f130c33..6f46501d6 100644
--- a/packages/kit/test/apps/options/package.json
+++ b/packages/kit/test/apps/options/package.json
@@ -17,7 +17,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/apps/writes/package.json b/packages/kit/test/apps/writes/package.json
index 8101b686c..69f7119e1 100644
--- a/packages/kit/test/apps/writes/package.json
+++ b/packages/kit/test/apps/writes/package.json
@@ -18,7 +18,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json
index a88e5cca1..75d94af4a 100644
--- a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json
+++ b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.7.1",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json
index 53bd4ede4..d532d6cc4 100644
--- a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json
+++ b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json
index 406510172..60ea0bd0e 100644
--- a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env/package.json b/packages/kit/test/build-errors/apps/private-dynamic-env/package.json
index 46c8569b5..32749ab37 100644
--- a/packages/kit/test/build-errors/apps/private-dynamic-env/package.json
+++ b/packages/kit/test/build-errors/apps/private-dynamic-env/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json
index cabc02028..748f99f82 100644
--- a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/private-static-env/package.json b/packages/kit/test/build-errors/apps/private-static-env/package.json
index 793489980..7f2a65275 100644
--- a/packages/kit/test/build-errors/apps/private-static-env/package.json
+++ b/packages/kit/test/build-errors/apps/private-static-env/package.json
@@ -15,7 +15,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json
index 8e10e3d9c..c52f86587 100644
--- a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/server-only-folder/package.json b/packages/kit/test/build-errors/apps/server-only-folder/package.json
index 63ce06eb2..b53e6a11f 100644
--- a/packages/kit/test/build-errors/apps/server-only-folder/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-folder/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json
index 6a0789716..83beb5209 100644
--- a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/build-errors/apps/server-only-module/package.json b/packages/kit/test/build-errors/apps/server-only-module/package.json
index 33cf9eb04..f48ee067f 100644
--- a/packages/kit/test/build-errors/apps/server-only-module/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-module/package.json
@@ -14,7 +14,7 @@
 		"svelte": "^3.55.0",
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/prerendering/basics/package.json b/packages/kit/test/prerendering/basics/package.json
index 86562fd79..51d48dfa7 100644
--- a/packages/kit/test/prerendering/basics/package.json
+++ b/packages/kit/test/prerendering/basics/package.json
@@ -15,7 +15,7 @@
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/prerendering/options/package.json b/packages/kit/test/prerendering/options/package.json
index 849b72cd3..bd53a85b1 100644
--- a/packages/kit/test/prerendering/options/package.json
+++ b/packages/kit/test/prerendering/options/package.json
@@ -15,7 +15,7 @@
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/prerendering/paths-base/package.json b/packages/kit/test/prerendering/paths-base/package.json
index b44f73d5c..c33592538 100644
--- a/packages/kit/test/prerendering/paths-base/package.json
+++ b/packages/kit/test/prerendering/paths-base/package.json
@@ -15,7 +15,7 @@
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }
diff --git a/packages/kit/test/prerendering/ssr-false/package.json b/packages/kit/test/prerendering/ssr-false/package.json
index 7887a34b6..52fb1d80d 100644
--- a/packages/kit/test/prerendering/ssr-false/package.json
+++ b/packages/kit/test/prerendering/ssr-false/package.json
@@ -15,7 +15,7 @@
 		"svelte-check": "^2.9.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
-		"vite": "^4.0.0"
+		"vite": "^4.0.4"
 	},
 	"type": "module"
 }