Skip to content

Commit

Permalink
allow routes to have the same name as fallback components - fixes #4186
Browse files Browse the repository at this point in the history
… (#4284)
  • Loading branch information
Rich-Harris authored Mar 10, 2022
1 parent 2e2f0af commit a47ecc0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/long-guests-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Allow routes with the same name as fallback components
2 changes: 1 addition & 1 deletion packages/kit/src/core/build/build_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export async function build_server(
const relative = path.relative(config.kit.files.routes, resolved);

const name = relative.startsWith('..')
? posixify(path.join('entries/pages', path.basename(file)))
? posixify(path.join('entries/fallbacks', path.basename(file)))
: posixify(path.join('entries/pages', relative));
input[name] = resolved;
});
Expand Down
1 change: 1 addition & 0 deletions packages/kit/test/apps/options/source/pages/error.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- https://github.com/sveltejs/kit/issues/4186 -->

0 comments on commit a47ecc0

Please sign in to comment.