Skip to content

Commit

Permalink
update to point to vite plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmanders committed Jan 19, 2025
1 parent b5dae69 commit 0c37d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ Route::get('ziggy', fn () => response()->json(new Ziggy));

### Re-generating the routes file when your app routes change

If you are generating your Ziggy config as a file by running `php artisan ziggy:generate`, you may want to re-run that command when your app's route files change. The example below is a Laravel Mix plugin, but similar functionality could be achieved without Mix. Huge thanks to [Nuno Rodrigues](https://github.com/nacr) for [the idea and a sample implementation](https://github.com/tighten/ziggy/issues/321#issuecomment-689150082). See [#655 for a Vite example](https://github.com/tighten/ziggy/pull/655/files#diff-4aeb78f813e14842fcf95bdace9ced23b8a6eed60b23c165eaa52e8db2f97b61).
If you are generating your Ziggy config as a file by running `php artisan ziggy:generate`, you may want to re-run that command when your app's route files change. The example below is a Laravel Mix plugin, but similar functionality could be achieved without Mix. Huge thanks to [Nuno Rodrigues](https://github.com/nacr) for [the idea and a sample implementation](https://github.com/tighten/ziggy/issues/321#issuecomment-689150082). See [vite-plugin-ziggy](https://github.com/aniftyco/vite-plugin-ziggy) for how to use it with Vite.

<details>
<summary>Laravel Mix plugin example</summary>
Expand Down

0 comments on commit 0c37d34

Please sign in to comment.