Skip to content

Conversation

@NathanFlurry
Copy link
Member

Routes matching serverRoutes patterns will be handled by the server even if they match exclude patterns (e.g., URLs ending in .jpg).

Example

srvx({ 
  entry: 'server/server.ts',
  serverRoutes: ['/api/*'] 
})

This allows API routes like /api/uploads/image.jpg to be handled by the server instead of being skipped due to the .jpg extension matching the default exclude patterns.

Routes matching serverRoutes patterns will be handled by the server
even if they match exclude patterns (e.g., URLs ending in .jpg).

Example:
  srvx({ serverRoutes: ['/api/*'] })

This allows API routes like /api/uploads/image.jpg to be handled
by the server instead of being skipped due to the .jpg extension.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 20, 2026

Open in StackBlitz

npm i https://pkg.pr.new/rivet-dev/vite-plugin-srvx@9

commit: e97a4d8

@NathanFlurry
Copy link
Member Author

Superseded by #8 which now includes the serverRoutes priority fix and defaults to ['/api/*']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants