Skip to content

Commit

Permalink
fix: allow extending multiple other tsconfigs (#9413)
Browse files Browse the repository at this point in the history
possible since typescript 5.0
closes #9412

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
  • Loading branch information
JeremyMoeglich and dummdidumm authored Mar 13, 2023
1 parent 75e2c6f commit c45c35e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/metal-pugs-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: allow tsconfig to extend multiple other tsconfigs
7 changes: 6 additions & 1 deletion packages/kit/src/core/sync/write_tsconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ function load_user_tsconfig(cwd) {
function validate_user_config(kit, cwd, out, config) {
// we need to check that the user's tsconfig extends the framework config
const extend = config.options.extends;
const extends_framework_config = extend && path.resolve(cwd, extend) === out;
const extends_framework_config =
typeof extend === 'string'
? path.resolve(cwd, extend) === out
: Array.isArray(extend)
? extend.some((e) => path.resolve(cwd, e) === out)
: false;

const options = config.options.compilerOptions || {};

Expand Down

0 comments on commit c45c35e

Please sign in to comment.