Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dlebedef's avatar

Inertia SSR issue with route helper function used in setup

I'm having a fresh install with Laravel 10, Vite, Jetstream and Inertia SSR installed.

It all works well but when I try to use the route method provided by the Ziggy package inside vue the setup of a page I get an error saying route is not defined.

I can use route inside the template to generate the urls, even with SSR, I can use route inside a function, but outside of it I will get the error.

How can I make the route method available during SSR in the vue setup ?

0 likes
2 replies
la-bas's avatar

I have the same problem. Did you find a solution?

Please or to participate in this conversation.