Skip to content

Commit 4c3b548

Browse files
authored
fix(rsc): fix internal import to allow stable react vendor chunk (#824)
Just curiosity. I was wondering what would be a Vite equivalent of https://github.com/web-infra-dev/rsbuild/blob/main/packages/plugin-react/src/splitChunks.ts Testing `manualChunks` is postponed for #940 for now since that's going to be tricky for rolldown-vite ci.
1 parent 6291178 commit 4c3b548

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/rsc/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ function vitePluginUseServer(): Plugin[] {
737737
serverReferences[normalizedId] = id;
738738
const name = this.environment.name === "client" ? "browser" : "ssr";
739739
output.prepend(
740-
`import * as $$ReactClient from "${PKG_NAME}/${name}";\n`,
740+
`import * as $$ReactClient from "${PKG_NAME}/react/${name}";\n`,
741741
);
742742
return {
743743
code: output.toString(),

0 commit comments

Comments
 (0)