Skip to content
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

esbuild with router-plugin can't generate routeTree #3461

Open
birkskyum opened this issue Feb 17, 2025 · 1 comment
Open

esbuild with router-plugin can't generate routeTree #3461

birkskyum opened this issue Feb 17, 2025 · 1 comment

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Feb 17, 2025

Which project does this relate to?

Router

Describe the bug

When using esbuild with file-based routing, the routeTree isn't generated.

Your Example Website or App

https://stackblitz.com/edit/github-yqs94yab?file=src%2FrouteTree.gen.ts

Steps to Reproduce the Bug or Issue

Go to

  • /e2e/react-router/basic-esbuild-file-based/

Delete

  • ./src/routeTree.gen.ts

Run pnpm run build

Crash

> esbuild src/main.tsx --bundle --outfile=dist/main.js && tsc --noEmit

✘ [ERROR] Could not resolve "./routeTree.gen"

    src/main.tsx:4:26:
      4 │ import { routeTree } from './routeTree.gen'
        ╵                           ~~~~~~~~~~~~~~~~~

1 error
 ELIFECYCLE  Command failed with exit code 1.

Expected behavior

Regeneration of the routeTree

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 130.0.6723.58

Additional context

No response

@SeanCassiere
Copy link
Member

From what I can tell so far, it looks to be that the router-plugin isn't being registered by esbuild.
In fact, I'm having doubts as to whether it's even detecting the esbuild.config.js file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants