Skip to content

Commit

Permalink
[fix] #6842 - write_types does not work on windows (#6913)
Browse files Browse the repository at this point in the history
actually fix write_types on windows
  • Loading branch information
williamviktorsson authored Sep 20, 2022
1 parent a5f9de0 commit d19964a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cool-beans-only.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": patch
---

fix `write_types` on windows using posixify()
2 changes: 1 addition & 1 deletion packages/kit/src/core/sync/write_types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function write_types(config, manifest_data, file) {
return;
}

const id = path.posix.relative(config.kit.files.routes, path.dirname(file));
const id = posixify(path.relative(config.kit.files.routes, path.dirname(file)));

const route = manifest_data.routes.find((route) => route.id === id);
if (!route) return; // this shouldn't ever happen
Expand Down

0 comments on commit d19964a

Please sign in to comment.