Skip to content

Commit 5df6925

Browse files
committed
Preserve TypeScript config resolution
Amp-Thread-ID: https://ampcode.com/threads/T-01a029e2-5095-710a-9cce-0c6d8645c173
1 parent 7960a17 commit 5df6925

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,14 @@ function loadConfigFile(file: string): ts.ParsedCommandLine | undefined {
210210
}
211211
}
212212
const basePath = path.dirname(absolute)
213+
// Keep configFileName unset as before: setting it changes module/type-root
214+
// resolution for ordinary TypeScript projects based on the indexer cwd.
213215
const result = ts.parseJsonConfigFileContent(
214216
config,
215217
ts.sys,
216218
basePath,
217219
undefined,
218-
absolute,
220+
undefined,
219221
undefined,
220222
[svelteFileExtension]
221223
)

0 commit comments

Comments
 (0)