Skip to content

Instantly share code, notes, and snippets.

@lukeraymonddowning
Created July 2, 2022 16:12
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save lukeraymonddowning/ec5cb96a5ec8d57e5a1937a41e950e08 to your computer and use it in GitHub Desktop.
Save lukeraymonddowning/ec5cb96a5ec8d57e5a1937a41e950e08 to your computer and use it in GitHub Desktop.
export default defineConfig({
plugins: [
laravel(['resources/js/app.js']),
{
name: 'ziggy',
enforce: 'post',
handleHotUpdate({ server, file }) {
if (file.includes('/routes/') && file.endsWith('.php')) {
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`))
}
}
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment