diff --git a/.changeset/six-pants-melt.md b/.changeset/six-pants-melt.md new file mode 100644 index 000000000000..9491b8e50c1d --- /dev/null +++ b/.changeset/six-pants-melt.md @@ -0,0 +1,5 @@ +--- +"@sveltejs/kit": patch +--- + +fix `write_types` on windows diff --git a/packages/kit/src/core/sync/write_types/index.js b/packages/kit/src/core/sync/write_types/index.js index b925be7735b3..b9f1245e4f07 100644 --- a/packages/kit/src/core/sync/write_types/index.js +++ b/packages/kit/src/core/sync/write_types/index.js @@ -68,7 +68,7 @@ export async function write_types(config, manifest_data, file) { return; } - const id = path.relative(config.kit.files.routes, path.dirname(file)); + const id = path.posix.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