T
TanStack5mo ago
provincial-silver

code splitting file based routing doesn't work for memory history?

1. i try to use autoCodeSplitting: true in vite, it turns out it doesn't work 2. i try to turn off autoCodeSplitting: false then suffix all route with .lazy.tsx, like from "features.tsx to features.lazy.tsx,still doesn't work 3. i try to make it into 2 files, from features.tsx tofeatures/index.tsx and features/index.lazy.tsx 4. i also try to use lazy component: lazy(() =>import("./index.lazy").then((mod) => ({ default: mod.BlogAds }))), still doesn't work what's the problem? "@tanstack/react-router": "^1.114.3"
2 Replies
provincial-silver
provincial-silverOP5mo ago
src/routes/features/ai-search/index.tsx https://pastecode.io/s/2ix3o4a0 src/routes/features/ai-search/index.lazy.tsx https://pastecode.io/s/2unmtmtd vite.config.js https://pastecode.io/s/k4hpaan0
No description
No description
No description
provincial-silver
provincial-silverOP5mo ago
ok my bad, i forgot to remove inlineDynamicImports: true in vite.config.js

Did you find this page helpful?