diff --git a/packages/vite/src/rsc/rscBuildForServer.ts b/packages/vite/src/rsc/rscBuildForServer.ts index 1f6267bc7eda..cd352f522821 100644 --- a/packages/vite/src/rsc/rscBuildForServer.ts +++ b/packages/vite/src/rsc/rscBuildForServer.ts @@ -29,13 +29,6 @@ export async function rscBuildForServer( throw new Error('RSC entries file not found') } - const input = { - entries: rwPaths.web.entries, - ...clientEntryFiles, - ...serverEntryFiles, - ...customModules, - } - // TODO (RSC): No redwood-vite plugin, add it in here const rscServerBuildOutput = await viteBuild({ envFile: false, @@ -81,7 +74,12 @@ export async function rscBuildForServer( manifest: 'server-build-manifest.json', rollupOptions: { onwarn: onWarn, - input, + input: { + entries: rwPaths.web.entries, + ...clientEntryFiles, + ...serverEntryFiles, + ...customModules, + }, output: { banner: (chunk) => { // HACK to bring directives to the front