-
-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(start): expose vinxi router middleware #2893
Conversation
Extra routers for custom behavior and middleware for custom middleware
Make use of middlewares and extra custom routers
packages/start/src/config/index.ts
Outdated
@@ -280,6 +294,11 @@ export function defineConfig( | |||
], | |||
}) | |||
|
|||
opts.routerExtras?.forEach((val => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not allow adding extra Vinxi routers using this method.
The addRouter
method is what I'd go for.
// app.config.ts
import { defineConfig } from '@tanstack/start/config'
export default defineConfig({
// ...
}).addRouter({
// ...
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the Vinxi router stuff in favor of .addRouter
.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1811e3c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud. |
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Make use of vinxi strength by being able to use custom routers and middlewares on top of tanstack start and routers. To be used by advanced users only.