From 1e53248d2a7e6aa5d068b5ef11ad76c71359aeeb Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Thu, 14 Mar 2024 16:13:06 -0700 Subject: [PATCH] Serialize the `viteConfig.build.assetsDir` to the `remix-build-result.json` file --- packages/vercel-remix/vite.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/vercel-remix/vite.ts b/packages/vercel-remix/vite.ts index 2dc26209d76..693ffd89dd5 100644 --- a/packages/vercel-remix/vite.ts +++ b/packages/vercel-remix/vite.ts @@ -81,6 +81,7 @@ export function vercelPreset(): Preset { let buildEnd: VitePluginConfig["buildEnd"] = ({ buildManifest, remixConfig, + viteConfig }) => { if (entryServerPath) { rmSync(entryServerPath); @@ -106,10 +107,19 @@ export function vercelPreset(): Preset { } } + let assetsDir = viteConfig?.build?.assetsDir; + let json = JSON.stringify( { buildManifest, remixConfig, + viteConfig: assetsDir + ? { + build: { + assetsDir, + }, + } + : undefined, }, null, 2