F
Filament9mo ago
Mikail

hello guys, can Vite auto refresh filament asset in browser just like it does with Livewire

import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ plugins: [ laravel({ input: [ 'resources/css/app.css', 'resources/js/app.js',
], refresh: true, }), ], }); The new Vite config file
2 Replies
awcodes
awcodes9mo ago
import { defineConfig } from 'vite'
import laravel, { refreshPaths } from 'laravel-vite-plugin'

export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [
...refreshPaths,
'app/Filament/**',
],
}),
],
})
import { defineConfig } from 'vite'
import laravel, { refreshPaths } from 'laravel-vite-plugin'

export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [
...refreshPaths,
'app/Filament/**',
],
}),
],
})
Mikail
MikailOP9mo ago
Awesome, this works and Vite reloads the resources as I observe from the terminal. But it doesn't refresh the page automatically like it does with livewire pages. Is it normal?
Want results from more Discord servers?
Add your server