hooks.ts for server and client, but simple redirect not working unless I use hooks.server.ts #13637
Unanswered
rielzzapps
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I start a simple test application on sveltekit, and I add this hooks.ts file:
My expectations, because of hooks.ts, is that when I go to /test I just see the svelte welcome page.
But it gives the 404.
When I change it to hooks.server.ts, it works as expected. I try to understand why. Hooks.ts should be for server- and client-side code?
Beta Was this translation helpful? Give feedback.
All reactions