Problem
createFilesystemSidebar / createDefaultThemeFilesystemSidebar read the directory once (readdirSync), when the Vite config is evaluated. During dev, adding or removing a page under the sidebar folder never updates the sidebar — the route itself appears (the file router picks it up), but the sidebar stays stale until the dev server is manually restarted.
Feature request
Refresh the filesystem sidebar in dev when files are added/removed under the watched folder — e.g. recompute it behind a virtual module and invalidate on watcher events, or trigger a server restart from the solidbase plugin.
Workaround
A dev-only Vite plugin that restarts the server on add/unlink (edits keep normal HMR):
{
name: "sidebar-restart",
apply: "serve",
configureServer(server) {
const dir = fileURLToPath(
new URL("./src/routes/docs/components", import.meta.url)
)
const onFile = (file: string) => {
if (file.startsWith(dir) && file.endsWith(".mdx")) {
server.restart()
}
}
server.watcher.on("add", onFile)
server.watcher.on("unlink", onFile)
}
}
Versions: @kobalte/solidbase 0.6.9, vite 8.
Problem
createFilesystemSidebar/createDefaultThemeFilesystemSidebarread the directory once (readdirSync), when the Vite config is evaluated. During dev, adding or removing a page under the sidebar folder never updates the sidebar — the route itself appears (the file router picks it up), but the sidebar stays stale until the dev server is manually restarted.Feature request
Refresh the filesystem sidebar in dev when files are added/removed under the watched folder — e.g. recompute it behind a virtual module and invalidate on watcher events, or trigger a server restart from the solidbase plugin.
Workaround
A dev-only Vite plugin that restarts the server on add/unlink (edits keep normal HMR):
Versions:
@kobalte/solidbase0.6.9,vite8.