SolidStart's filesystem router as standalone Vite plugin intended for use in single page application (SPA).
Implementation taken from SolidStart and Vinxi.
npm install @edivados/vite-plugin-solid-filesystem-router
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";
import solidFilesystemRouter from "@edivados/vite-plugin-solid-filesystem-router";
export default defineConfig({
plugins: [
solid(),
solidFilesystemRouter()
]
});
- Type: Object
- Default: {}
- Type: string
- Default: 'src/routes'
Directory where to look for route files.
- Type: string[]
- Default: ['jsx', 'tsx']
An array of file extensions to be picked up as routes. By defualt only jsx
and tsx
are picked up.
- Type: BaseFileSystemRouter
- Defualt: undefined
Custom filesystem router implementation. dir
and extensions
option will be ignored if present. For more information see Vinxi and SolidStart.