Description
Which project does this relate to?
Router
Describe the bug
When you set up a static route with Nitro any Tanstack components to the static route will still attempt to call the loader dynamically.
If you are doing anything in the static route that is only available during the build phase, this will result in an error.
Hitting the link directly in the browser, through an Anchor () ref, or refreshing the page once you've errored out via your will load the page correctly via the Nitro-generated static site.
Treading lightly here as I know Static with Nitro implementation is still a WIP. 😄
Your Example Website or App
mattymattdev/symmetrical-octo-couscous@b3da210
Steps to Reproduce the Bug or Issue
- Create a static route as per the docs
- Do something in that route that requires something only available as a resource during build time
- Link to the static route with a Link component
- Build everything and navigate to your site
- Click the and watch whatever you're trying to access on the client side fail even though it was supposed to be a static route
Expected behavior
As a user I expected my to work.
Screenshots or Videos
No response
Platform
- Ubuntu, building for Cloudflare Pages
Additional context
Rationale for bringing this up is that different pages and teams might become static at different times during the optimization lifecycles of a new web app and it would be nice if hunting potentially dynamically generated s wasn't necessary if you wanted to do that.