Hot Reloading with Modules

Hi all, I am using laravel modules on a filament project and trying to get hot reloading working this is my vite config
import { defineConfig } from "vite";
import laravel, { refreshPaths } from 'laravel-vite-plugin'
import livewire from '@defstudio/vite-livewire-plugin'; // import plugin
import collectModuleAssetsPaths from "./vite-module-loader.js";

async function getConfig() {
const paths = [
"resources/css/app.css",
"resources/js/app.js",
"resources/css/filament/admin/theme.css",
//add addition module paths here
];
const allPaths = await collectModuleAssetsPaths(paths, "Modules");

return defineConfig({
plugins: [
laravel({
input: allPaths,
}),
livewire({
refresh: [
...refreshPaths, // Tracking changes wherever app.js is called
'app/Http/Livewire/**', // To monitor LiveWire components (if applicable)
'app/Filament/**',
'Modules/**' // To monitor changes in the Modules folder
]
})
],
});
}

export default getConfig;
import { defineConfig } from "vite";
import laravel, { refreshPaths } from 'laravel-vite-plugin'
import livewire from '@defstudio/vite-livewire-plugin'; // import plugin
import collectModuleAssetsPaths from "./vite-module-loader.js";

async function getConfig() {
const paths = [
"resources/css/app.css",
"resources/js/app.js",
"resources/css/filament/admin/theme.css",
//add addition module paths here
];
const allPaths = await collectModuleAssetsPaths(paths, "Modules");

return defineConfig({
plugins: [
laravel({
input: allPaths,
}),
livewire({
refresh: [
...refreshPaths, // Tracking changes wherever app.js is called
'app/Http/Livewire/**', // To monitor LiveWire components (if applicable)
'app/Filament/**',
'Modules/**' // To monitor changes in the Modules folder
]
})
],
});
}

export default getConfig;
I get no errors but hot reloading isnt firing on a change - anyone any ideas?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server