From 4cd148c3ef501bb994dba53bd354a40547ef8e47 Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Sat, 29 Mar 2025 23:38:13 +0000 Subject: [PATCH] Vite will refresh the page when we change/save PHP code in `app/**` --- docs-assets/app/vite.config.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs-assets/app/vite.config.js b/docs-assets/app/vite.config.js index 0bed788388..466fcc885b 100644 --- a/docs-assets/app/vite.config.js +++ b/docs-assets/app/vite.config.js @@ -1,12 +1,17 @@ import { defineConfig } from 'vite' -import laravel from 'laravel-vite-plugin' +import laravel, {refreshPaths} from 'laravel-vite-plugin' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [ laravel({ input: ['resources/css/app.css', 'resources/js/app.js'], - refresh: true, + refresh: { + paths: [ + ...refreshPaths, + 'app/**/*.php' + ], + }, }), tailwindcss(), ],