Skip to content

Commit e5bce7d

Browse files
feat(dev/vite): add support for buildDirectory in RSC Framework Mode (#14163)
1 parent ec137f5 commit e5bce7d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

packages/react-router-dev/vite/rsc/plugin.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,21 @@ export function reactRouterRSCVitePlugin(): Vite.PluginOption[] {
7676
jsxDev: viteCommand !== "build",
7777
},
7878
environments: {
79-
client: { build: { outDir: "build/client" } },
80-
rsc: { build: { outDir: "build/server" } },
81-
ssr: { build: { outDir: "build/server/__ssr_build" } },
79+
client: {
80+
build: {
81+
outDir: join(config.buildDirectory, "client"),
82+
},
83+
},
84+
rsc: {
85+
build: {
86+
outDir: join(config.buildDirectory, "server"),
87+
},
88+
},
89+
ssr: {
90+
build: {
91+
outDir: join(config.buildDirectory, "server/__ssr_build"),
92+
},
93+
},
8294
},
8395
build: {
8496
rollupOptions: {

0 commit comments

Comments
 (0)