Skip to content

Commit 1752dea

Browse files
authored
fix: repl redirect to playground (#1089)
1 parent 2b6bcc8 commit 1752dea

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

apps/svelte.dev/src/hooks.server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ export async function handle({ event, resolve }) {
5555
redirect(307, destination);
5656
}
5757

58+
// For REPL. For some reason, the repl/+page.server.ts file is not working, so
59+
// we are doing the redirect here
60+
if (event.url.pathname.startsWith('/repl')) {
61+
redirect(307, event.url.pathname.replace('/repl', '/playground'));
62+
}
63+
5864
// Best effort to redirect from Svelte 3 tutorial to new tutorial
5965
if (event.url.pathname.startsWith('/tutorial/') && event.url.pathname.split('/').length === 2) {
6066
redirect(307, event.url.pathname.replace('/tutorial/', '/tutorial/svelte/'));

apps/svelte.dev/src/routes/repl/[...path]/+page.server.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)