TanStackT
TanStack13mo ago
9 replies
awake-maroon

Vite config issue?

My TSS side project is working fine and I want to add in Clerk. I spun up the TSS Clerk example app and that works fine too. I've copied across the Clerk related stuff into my side project and I'm getting -
Error: We detected that the '@vitejs/plugin-react' was passed before '@tanstack/start-vite-plugin'. Please make sure that '@tanstack/router-vite-plugin' is passed before '@vitejs/plugin-react' and try again: 
e.g.

plugins: [
  TanStackStartVite(), // Place this before viteReact()
  viteReact(),
]

My app.config.ts seems pretty vanilla -
import { defineConfig } from '@tanstack/start/config'
import tsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  vite: {
    plugins: [
      tsConfigPaths({
        projects: ['./tsconfig.json'],
      }),
    ],
  },
})

I'm using the latest versions of everything. Is it possible I've got a library version conflict in my dependencies?
Was this page helpful?