tighten / ziggy

Use your Laravel routes in JavaScript.
MIT License
3.83k stars 247 forks source link

Ziggy Import Vue #747

Closed alnutile closed 4 months ago

alnutile commented 4 months ago

Maybe I am missing a step? This is the only way I can get the import to work without getting an error from vite.

Laravel 10 and 11. "tightenco/ziggy": "^2.1"

Hope this helps?

bakerkretzmar commented 4 months ago

That particular example is based on the section right above, which shows how to add an alias in Vite to point ziggy-js to that vendor path: https://github.com/tighten/ziggy?tab=readme-ov-file#importing-the-route-function. Importing from ../../vendor/tightenco/ziggy is fine too though.