Skip to content

SolidStart's filesystem router as standalone Vite plugin intended for use in single page application (SPA).

License

Notifications You must be signed in to change notification settings

edivados/vite-plugin-solid-filesystem-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite Plugin Solid Filesystem Router

SolidStart's filesystem router as standalone Vite plugin intended for use in single page application (SPA).

Implementation taken from SolidStart and Vinxi.

Installation

npm install @edivados/vite-plugin-solid-filesystem-router

Usage

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()
  ]
});

Options

options

  • Type: Object
  • Default: {}

options.dir

  • Type: string
  • Default: 'src/routes'

Directory where to look for route files.

options.extensions

  • 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.

options.router

  • Type: BaseFileSystemRouter
  • Defualt: undefined

Custom filesystem router implementation. dir and extensions option will be ignored if present. For more information see Vinxi and SolidStart.

About

SolidStart's filesystem router as standalone Vite plugin intended for use in single page application (SPA).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published