FilamentF
Filament12mo 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 */
        }),
    ],
});
Was this page helpful?