CSS import error after upgrading Tanstack Start & Router to 1.121.0
I am getting this import error when importing the app.css file.
Happend after the upgrade.
This is my vite.config.ts:
// vite.config.ts
import path from "path"
import tailwindcss from "@tailwindcss/vite"
import { tanstackStart } from "@tanstack/react-start/plugin/vite"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"
import tsConfigPaths from "vite-tsconfig-paths"
const ReactCompilerConfig = { target: "19" }
export default defineConfig({
plugins: [
tsConfigPaths({
projects: ["./tsconfig.json"],
}),
tanstackStart({
react: {
babel: {
plugins: [["babel-plugin-react-compiler", ReactCompilerConfig]],
},
},
}),
tailwindcss(),
react(),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
})

7 Replies
optimistic-gold•3mo ago
this is working for me, but i dont use resolve alias from vite, i just use the tsconfig alias
and
tsConfigPaths
stormy-gold•3mo ago
you need the vite types https://vite.dev/guide/features#client-types
optimistic-goldOP•3mo ago
@Manuel Schiller do you have example repo with all that uses the newest tanstack 1.121.0?
stormy-gold•3mo ago
all of our examples
stormy-gold•3mo ago
GitHub
router/examples/react/start-basic/src/routes/__root.tsx at main · ...
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
stormy-gold•3mo ago
just this line
as shown in the vite docs
optimistic-goldOP•3mo ago
Thanks!