Skip to content

Commit b2cf726

Browse files
committed
Preventing Vite from CSS code splitting
1 parent 25e0c0c commit b2cf726

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/routes/__root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77
Scripts,
88
} from "@tanstack/react-router";
99
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
10-
import appCss from "@/styles.css?url";
1110
import TanStackQueryDevtools from "../integrations/tanstack-query/devtools";
1211
import { defaultSEO, seo } from "../utils/seo";
12+
import appCss from "../styles.css?url";
1313

1414
interface MyRouterContext {
1515
queryClient: QueryClient;

vite.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ const config = defineConfig({
3030
ssr: {
3131
external: ['@vercel/og', 'satori', 'yoga-wasm-web'],
3232
},
33+
build: {
34+
cssCodeSplit: false,
35+
rollupOptions: {
36+
output: {
37+
manualChunks: undefined,
38+
},
39+
},
40+
},
3341
})
3442

3543
export default config

0 commit comments

Comments
 (0)