Although it's recommended to use the default integrations, in some cases, full stack projects or monorepo tooling like Nx might require certain project structure. This example uses src/pages inside a client directory in the project root.
- Source files are located at
./client/srcinstead of./src(default)- Pages located at
./client/src/pagesinstead of./src/pages(default)
- Pages located at
- Custom integration added at
./client/src/routes.tsx- Based on one of
packages/generouted/srcintegrations- Copied from
packages/generouted/src/react-router.tsx - Only
import.meta.globpatterns for routes, preserved routes and modals are updated to be prefixed with/client - Exports
<Routes />component that's imported at app entry./client/src/main.tsx
- Copied from
- Based on one of
- Custom config for Vite plugin at
./vite.config.ts- Both
sourceandoutputhave the default values but prefixed with./client
- Both
Run this example online via StackBlitz: