Skip to content

Vite plugin routeTree.gen breaking typo createRooRoute instead of createRootRoute #4450

Closed
@RicoPup

Description

@RicoPup

Which project does this relate to?

Router

Describe the bug

In the @tanstack/router-vite-plugin package, when my routeTree.gen.ts file is generated, it generates with a typo which breaks everything.

Image

Image

I checked my (new) project for anything with a 'roo' typo, and there was nothing but this file.
When I switched to using @tanstack/router-plugin instead, it worked perfectly fine.

I don't think it's relevant, but for context this was for a Tauri app with a rust backend and React frontend, using pnpm.

Your Example Website or App

This doesn't require a URL, it was on a fresh project.

Steps to Reproduce the Bug or Issue

  1. Set up a Tauri project with React frontend.
  2. Install latest @tanstack/react-router and @tanstack/router-vite-plugin packages.
  3. Set up your routes dir under src
  4. Create __root.tsx and index.tsx files

export default function RootLayout() {
    return <Outlet />;
}```
```import { createFileRoute } from '@tanstack/react-router';

export const Route = createFileRoute('/')({
    component: App,
});

function App() {
    return <div>Hello World</div>;
}
  1. npm/pnpm install
  2. npm/pnpm run dev (assuming you have your script in package.json)
  3. You should experience the error with createRooRoute()

Expected behavior

I expected to not get 'createRooRoute' and have an error.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions