[vite] Internal server error: Property left of ForOfStatement expected node to be of a type ["VariableDeclaration","LVal"] but instead got undefined
Plugin: vite-plugin-tanstack-start-dead-code-elimination
File: /Users/alexanbj/Code/Hacking/tanstackstart-sanity-reproduction/node_modules/.vinxi/cache/client/deps/chunk-XONAPM26.js?v=ffa86631
Which project does this relate to?
Start
Describe the bug
Hello,
I'm attempting to embed a Sanity studio in a newly setup TanStack Start app.
I'm followed the TanStack Start getting started guide and Sanity's embedding studio guide. However, an exception is thrown if I navigate to that route when using the development server. I've created a reproduction repo.
The error seems to occur in
vite-plugin-tanstack-start-dead-code-elimination
. See the full error in the reproduction steps or the reproduction repo.No error is thrown when building the app for production.
Your Example Website or App
https://github.com/alexanbj/tanstackstart-embedded-sanity-reproduction/tree/main
Steps to Reproduce the Bug or Issue
Expected behavior
Able to embed the Sanity studio in development.
Screenshots or Videos
No response
Platform
Additional context
No response