Browser does not refresh on file save (Docker)

Please, anyone using Docker (macOS) my browser is not refreshing automatically. I have done the following: File: vite.config.js
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/Livewire/**',
],
}),
],
});
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/Livewire/**',
],
}),
],
});
File: tailwind.config.js
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
theme: {
extend: {},
},
plugins: [],
}
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
theme: {
extend: {},
},
plugins: [],
}
I'm using: Laravel v10 Filament v3 (new project/fresh install) Docker macOS Safari I do run: 'sail npm run dev', when saving a file (Filament file eg. app/Filament/Resources/UserResource.php) on the terminal I get:
12:17:40 PM [vite] page reload app/Filament/Resources/UserResource.php
12:17:40 PM [vite] page reload app/Filament/Resources/UserResource.php
Unfortunately, my browser does not auto-refresh. Any ideas, thank you. Pablo
2 Replies
Pablo Torres
Pablo TorresOP12mo ago
Working by adding the following on AppServiceProvider.php
public function boot(): void
{
Filament::registerRenderHook('panels::head.end', fn (): string => Blade::render('@vite ( [\'resources/css/app.css\',\'resources/js/app.js\'])'));

}
public function boot(): void
{
Filament::registerRenderHook('panels::head.end', fn (): string => Blade::render('@vite ( [\'resources/css/app.css\',\'resources/js/app.js\'])'));

}
Following: https://www.answeroverflow.com/m/1162045851183611945#solution-1162066119511789659 Thanks.
Vite not refreshing dashboard views - Filament
Refreshes and compiles on the welcome.blade.php. Doesn't refresh on inner filament pages. Won't compile tailwind classes on livewire components either. I am stumped! ```import {defineConfig} from 'vite' import laravel, {refreshPaths} from 'laravel-vite-plugin' export default defineConfig({ plugins: [ laravel({ input: ...
Maxwell Mezadre
Maxwell Mezadre12mo ago
I'm using

Laravel 10
Sail
Docker
Valet (with proxy to localhost:8080 and secure)

And I added this to my AppPanelProvider.php:

public function register(): void
{
parent::register();

FilamentView::registerRenderHook('panels::body.end', function (): string {
return Blade::render("@vite(['resources/js/app.js', 'resources/css/app.css'])");
});
}

And I added this to my AppServiceProvider:

public function boot(): void
{
FilamentView::registerRenderHook('panels::head.end', fn (): string => Blade::render('@vite ( [\'resources/css/app.css\',\'resources/js/app .js\'])'));
}

And it still doesn't refresh :(
I'm using

Laravel 10
Sail
Docker
Valet (with proxy to localhost:8080 and secure)

And I added this to my AppPanelProvider.php:

public function register(): void
{
parent::register();

FilamentView::registerRenderHook('panels::body.end', function (): string {
return Blade::render("@vite(['resources/js/app.js', 'resources/css/app.css'])");
});
}

And I added this to my AppServiceProvider:

public function boot(): void
{
FilamentView::registerRenderHook('panels::head.end', fn (): string => Blade::render('@vite ( [\'resources/css/app.css\',\'resources/js/app .js\'])'));
}

And it still doesn't refresh :(
Want results from more Discord servers?
Add your server