-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Which project does this relate to?
Start
Describe the bug
Using the Bun runtime, in both 1.2 and 1.3 seems to cause issues for HMR.
When creating a tanstack application with the install command using the Bun runtime, making changes to files takes ~2-10 minutes, depending on whether or not Nitro() is added or removed from the vite.config.ts.
The same issue occured on multiple projects I created using different versions of the bun runtime, also present on multiple browsers, such as Firefox, Chrome etc.
When HMR has not yet worked, reloading the page causes a Hydration error Server vs Client issue.
Your Example Website or App
https://github.com/OliverHeward/tanstack-bun-minimal
Steps to Reproduce the Bug or Issue
- Create a new starter project with
bun create tanstack/start@latest
- Choose a project name.
- Set up a basic project, installing tailwind, biome, nitro (default), no other installs.
- Navigate to project and start
cd [name] && [editor] . && bun run dev - In the code editor, navigate to
src/routes/index.html - Delete lines 58>94
- HMR does not kick in
Stop the process after waiting too long, and remove Nitro() from vite.config.ts
Repeat process 4.
Included tests were changing className on an element to see if HMR worked for elements present in the document, and including new elements such has a <h1>Hello World!</h1>
Expected behavior
Would expect the behaviour...
Developer saves file, file is picked up as changed by underlying tech behind HMR, and the app is recompiled / bundled for client.
Screenshots or Videos
No response
Platform
- Router / Start Version: [e.g. 1.121.0]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Browser Version: [e.g. 91.1]
- Bundler: [e.g. vite]
- Bundler Version: [e.g. 7.0.0]
Additional context
Package list for this specific project:
├── @biomejs/[email protected]
├── @tailwindcss/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @vitejs/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Package list for project this was noticed on: ([email protected])
├── @biomejs/[email protected]
├── @tailwindcss/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @vitejs/[email protected]
├── [email protected]
├── [email protected]
├── [email protected] invalid: "latest" from the root project
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]