Skip to content

Commit b796cb2

Browse files
update generated tsconfig (#4791)
* update generated tsconfig * update generated tsconfig * use esnext * Update .changeset/hip-ears-reflect.md Co-authored-by: Rich Harris <[email protected]>
1 parent b2c3707 commit b796cb2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/hip-ears-reflect.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+
[breaking] add lib, module, and target to generated tsconfig

packages/kit/src/core/sync/write_tsconfig.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ export function write_tsconfig(config) {
5656
isolatedModules: true,
5757
// TypeScript doesn't know about import usages in the template because it only sees the
5858
// script of a Svelte file. Therefore preserve all value imports. Requires TS 4.5 or higher.
59-
preserveValueImports: true
59+
preserveValueImports: true,
60+
61+
// This is required for svelte-kit package to work as expected
62+
// Can be overwritten
63+
lib: ['esnext', 'DOM'],
64+
moduleResolution: 'node',
65+
module: 'esnext',
66+
target: 'esnext'
6067
},
6168
include,
6269
exclude: [config_relative('node_modules/**'), './**']

0 commit comments

Comments
 (0)