-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ziggy is no longer optional #1023
Comments
I've just faced this issue also. I removed Ziggy because it felt like it exposed too much. This occurred with a
|
Ping @xiCO2k |
We can remove Ziggy was already a requirement before the addition of SSR. (now we just need to pass on both the |
@xiCO2k the problem is that existing apps don't have it installed. And thus ShareInertiaData breaks since it's a package class and not a stub. |
Yes that's right, will PR a change on that later today, to move the That way the user have full control. |
Description:
Well with the newly added Intertia SSR Support #1012 Ziggy is now imposed to us
jetstream/src/Http/Middleware/ShareInertiaData.php
Line 10 in 090fdfb
jetstream/src/Http/Middleware/ShareInertiaData.php
Lines 60 to 63 in 090fdfb
So i believe theres no more reason to install ziggy as an optional dependecy
jetstream/src/Console/InstallCommand.php
Line 284 in 090fdfb
and it should now be part of the package, also i think this is a breaking chance (since it is) because y if people decide not to use ziggy because as the creator of Inertia Jonathan Reinink says :https://twitter.com/reinink/status/1298577581650980871 some of use get rid of Ziggy because it causes more issues than it solves. But now we are forced to. wich is ok, it's your package guys, thanks for all the work you. just, like I mentioned above, now require the package withing the package and don't make it optional if we are not able to remove it, or maybe make it so we can publish de middleware and we might if we choose get rid of it completley.
To add on that, i think it's even bad practice to be using ziggy the way the Pull Request uses it:
jetstream/stubs/inertia/resources/js/ssr.js
Lines 18 to 27 in 090fdfb
since, in Vue 3 mixins are no longer recommended https://vuejs.org/api/options-composition.html#mixins
And since in the same relase we just got the composition API #1001 as default it does make sense not to force ziggy on us
Sorry for the probably bad english btw, not my first tongue
Steps To Reproduce:
Fresh install of Jetstream with the removal of Ziggy as dependency
The text was updated successfully, but these errors were encountered: