Replies: 1 comment 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ziggy version
2.3.0
Laravel version
10
Description
I think this has been covered elsewhere, but I've not found a definitive answer.
When using
php artisan ziggy:generate
the APP_URL is hard-coded into the resultingziggy.js
file, so if, like me, you are using Vite and Vue, the resulting assets include the wrong route domain when transferred to the production server.What's the solution to this? I obviously don't want to build assets on the production server, and I don't want to edit ziggy.js before building assets. Nor do I want to use the @routes Blade directive in my Vue root file.
Ziggy call and context
Ziggy configuration
Route definition
Beta Was this translation helpful? Give feedback.
All reactions