Replies: 1 comment 2 replies
-
It doesn't look to me like that's the error, it looks like there are no routes. I'm not super familiar with Svelte but I think the issue is probably that when you're doing With Vue, something like that works because If Svelte has plugins or mixins like that you could define your own Let me know if any of that helps! |
Beta Was this translation helpful? Give feedback.
-
Ziggy version
v2.0.4
Laravel version
v11.0.7
Description
I'm trying to integrate Ziggy.js with Inertia.js SSR in a Svelte application, but I'm having trouble passing the Ziggy configuration to the Inertia.js context. Here's my current setup (ssr.js):
Somewhere in my svelte app I am doing this, which works fine outside of SSR:
But when running ssr.js I am getting the following error:
I assume that when SSR is loading it does not know what the 'route' function is. In my svelte app it's a function on the window object but this is not available on the server. How can I make it available on the server side as well?
Beta Was this translation helpful? Give feedback.
All reactions