From 3f7cd4102a357ccf134d417284ecbfe2c288d916 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Thu, 13 Jul 2023 16:44:50 +0200 Subject: [PATCH 1/2] RSC build without user config --- packages/vite/src/buildRscFeServer.ts | 4 ++-- packages/vite/src/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/buildRscFeServer.ts b/packages/vite/src/buildRscFeServer.ts index a34379c5599f..078346566233 100644 --- a/packages/vite/src/buildRscFeServer.ts +++ b/packages/vite/src/buildRscFeServer.ts @@ -36,7 +36,7 @@ export const buildRscFeServer = async ({ const { clientEntryFiles, serverEntryFiles } = await rscBuild(viteConfigPath) const clientBuildOutput = await viteBuild({ - configFile: viteConfigPath, + // configFile: viteConfigPath, root: webSrc, plugins: [react(), rscIndexPlugin()], build: { @@ -194,7 +194,7 @@ export const buildRscFeServer = async ({ // https://github.com/microsoft/TypeScript/issues/53656 have both landed we // should try to do this instead: // const clientBuildManifest: ViteBuildManifest = await import( - // path.join(getPaths().web.dist, 'build-manifest.json'), + // path.join(getPaths().web.dist, 'client-build-manifest.json'), // { with: { type: 'json' } } // ) // NOTES: diff --git a/packages/vite/src/index.ts b/packages/vite/src/index.ts index 1684cb7299e9..4d4213ea32dd 100644 --- a/packages/vite/src/index.ts +++ b/packages/vite/src/index.ts @@ -15,7 +15,7 @@ import { handleJsAsJsx } from './vite-plugin-jsx-loader' * Preconfigured vite plugin, with required config for Redwood apps. * */ -export default function redwoodPluginVite(): PluginOption[] { +export function redwoodStreamingSSRPluginVite(): PluginOption[] { const rwPaths = getPaths() const rwConfig = getConfig() From a71183c6292f31c9ec4c8f6f26dc58270b7c81f4 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Thu, 13 Jul 2023 16:46:23 +0200 Subject: [PATCH 2/2] limit code churn --- packages/vite/src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/index.ts b/packages/vite/src/index.ts index 4d4213ea32dd..d53c944de08d 100644 --- a/packages/vite/src/index.ts +++ b/packages/vite/src/index.ts @@ -12,10 +12,9 @@ import { getConfig, getPaths } from '@redwoodjs/project-config' import { handleJsAsJsx } from './vite-plugin-jsx-loader' /** - * Preconfigured vite plugin, with required config for Redwood apps. - * + * Pre-configured vite plugin, with required config for Redwood apps. */ -export function redwoodStreamingSSRPluginVite(): PluginOption[] { +export default function redwoodPluginVite(): PluginOption[] { const rwPaths = getPaths() const rwConfig = getConfig()