Rakkas looks for a configuration file named
.ts) in your project root. This file is bundled with esbuild before loading, so you can use modern EcmaScript and TypeScript features.
The configuration file is not needed if you're happy with the defaults.
This file should default export a configuration object or a function that returns one (possibly asynchronously). Supported options are:
|pageExtensions||File extensions for pages and layouts|
|pagesDir||Directory that contains pages and layouts relative to |
|endpointExtensions||File extensions for endpoints and middleware|
|apiDir||Directory that contains API routes relative to |
|apiRoot||Base URL for API routes|
|trustForwardedOrigin||Set to true to trust |
|vite||Vite configuration (not all options are supported)|
|babel||Babel options passed to Vite's React plugin|
TRUST_FORWARDED_ORIGIN environment variable for production use.
You can import the
defineConfig function from
@rakkasjs/cli to ensure TypeScript IDE completion.