-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Which project does this relate to?
Router
Describe the bug
// vite.config.ts
tanstackStart({
router: {
virtualRouteConfig: 'src/routes.ts',
},
}),When using virtualRouteConfig with tanstack/start, loadConfigFile uses tsx behind the scenes to load the config file. The problem is that tsx is node specific and doesn't work with bun.
The hacky solution is to make sure your environment also has node installed. (So I've updated our Dockerfile to install node before running vite build, but then it continues to use bun to serve the server).
I am unsure what the full solution should be... change how the virtualRouteConfig gets loaded? add a "bun" flag?
Your Example Website or App
I could build a full reproduction but it would take a lot of time when the issue is easy to see in the code (it uses tsx!)
Steps to Reproduce the Bug or Issue
- use
virtualRouteConfigand try to build with only bun.
Expected behavior
I would expect tanstack/start to work with bun when using virtualRouteConfig.
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.134.10 (but the issue is there in latest)
- OS: mac
- Browser: n/a
- Browser Version: n/a
- Bundler: vite
- Bundler Version: 6
Additional context
No response
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels