@routes directive generate script problem. #810
-
Hello, i wanted to ask it from discussions before going to the "issues" tab. Yesterday i've upgraded my ziggy package from 1.0 to 2.0 (i use Laravel + Inertia + React with Vite Bundling.) Now whenever i go specific route other than "/" it echoes "MergeScript" into document and automatically SPA fails. Whenever i go "/" route it prints the whole Ziggy object and works very well (even after i redirect other pages but whenever i refresh the page problem occurs.) I think i detected the problem, its in I've tried to make ziggy.php inside of configs and put to override this but no luck.
Anyone can help? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Where exactly do you have the |
Beta Was this translation helpful? Give feedback.
-
Had to go workaround on that, let me know if there is any fixes or is it even a real issue. App\Ziggy\CustomMergeScript.php:
...and then
|
Beta Was this translation helpful? Give feedback.
I'd need more information about your setup to debug this, but it seems like other pages in your app besides the home route might be rendering that home template and making Ziggy think it's been generated already. Can you share your root Inertia blade template and your HandleInertia middleware?