Skip to content

Commit

Permalink
fix: normalize paths in emitDts map
Browse files Browse the repository at this point in the history
bug introduced in #2443, affecting windows systems
  • Loading branch information
dummdidumm committed Jul 30, 2024
1 parent 6192d75 commit fbff4ee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/svelte2tsx/src/emitDts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,14 @@ async function createSvelteMap(config: EmitDtsConfig): Promise<SvelteMap> {
version,
noSvelteComponentTyped: noSvelteComponentTyped
}).code;
svelteFiles.set(path, transformed);
svelteFiles.set(path.replace(/\\/g, '/'), transformed);
return isTsFile;
}

return { add, get: (key: string) => svelteFiles.get(key) };
return {
add,
get: (key: string) => svelteFiles.get(key.replace(/\\/g, '/'))
};
}

function isSvelteFilepath(filePath: string) {
Expand Down

0 comments on commit fbff4ee

Please sign in to comment.