F
Filament4w ago
Hedi

auto refresh filament page when changing code?

hello, i'm using vite and filamentphp, but when i edit something, say for example adding a form component, i have to manually go back to the browser and refresh the page. is this auto refresh not supported in filament or am i doing something wrong? here's my vite.config.js file
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; //add this line
import { resolve } from "path"; // Import the resolve function from 'path'
import AutoImport from "unplugin-auto-import/vite";
import laravel, { refreshPaths } from "laravel-vite-plugin";

export default defineConfig({
resolve: {
alias: {
root: resolve(__dirname, "resources"), // Use resolve() to get the correct path
},
},
plugins: [
vue(), // write this
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
//refresh: true,
refresh: [...refreshPaths, "app/Livewire/**"],
}),
AutoImport({
/* options */
}),
],
});
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; //add this line
import { resolve } from "path"; // Import the resolve function from 'path'
import AutoImport from "unplugin-auto-import/vite";
import laravel, { refreshPaths } from "laravel-vite-plugin";

export default defineConfig({
resolve: {
alias: {
root: resolve(__dirname, "resources"), // Use resolve() to get the correct path
},
},
plugins: [
vue(), // write this
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
//refresh: true,
refresh: [...refreshPaths, "app/Livewire/**"],
}),
AutoImport({
/* options */
}),
],
});
1 Reply
Ava
Ava4w ago
Good Morning @Hedi - Here is my two cents, might be wrong but lets try huh? Double check that your refresh array includes all relavant paths.
refresh: [...refreshPaths, "app/Livewire/**", "resources/views/**"],
refresh: [...refreshPaths, "app/Livewire/**", "resources/views/**"],

Did you find this page helpful?