Skip to content

Commit 2c98af9

Browse files
committed
fix: respect build.target config supplied by user
1 parent 5dae367 commit 2c98af9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.changeset/fluffy-insects-build.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sveltejs/kit": patch
3+
---
4+
5+
fix: use Vite's default value for `build.target` and respect override supplied by user

documentation/docs/60-appendix/30-migrating-to-sveltekit-2.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,3 @@ SvelteKit 2 requires Node `18.13` or higher, and the following minimum dependenc
161161
`svelte-migrate` will update your `package.json` for you.
162162

163163
As part of the TypeScript upgrade, the generated `tsconfig.json` (the one your `tsconfig.json` extends from) now uses `"moduleResolution": "bundler"` (which is recommended by the TypeScript team, as it properly resolves types from packages with an `exports` map in package.json) and `verbatimModuleSyntax` (which replaces the existing `importsNotUsedAsValues ` and `preserveValueImports` flags — if you have those in your `tsconfig.json`, remove them. `svelte-migrate` will do this for you).
164-
165-
SvelteKit 2 uses ES2022 features, which are supported in all modern browsers.

packages/kit/src/exports/vite/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ async function kit({ svelte_config }) {
645645
preserveEntrySignatures: 'strict'
646646
},
647647
ssrEmitAssets: true,
648-
target: ssr ? 'node18.13' : 'es2022'
648+
target: ssr ? 'node18.13' : undefined
649649
},
650650
publicDir: kit.files.assets,
651651
worker: {

0 commit comments

Comments
 (0)