âš¡How to - vite-plugin-kit-routes
💡
Never be out of sync with your routes again 🥳
Installation
npm i -D vite-plugin-kit-routes
Configuration
Add the plugin like this:
vite.config.js
import { kitRoutes } from 'vite-plugin-kit-routes'
/** @type {import('vite').UserConfig} */
const config = {
plugins: [
// This is the plugin to add
kitRoutes()
]
}
export default config
It will create a file ./src/lib/ROUTES.ts
at the start of your dev server & any update of any of
your +page.svelte
.
Side Notes
- It's very early, things might change! 😉