Skip to content

Commit

Permalink
Serialize the viteConfig.build.assetsDir to the `remix-build-result…
Browse files Browse the repository at this point in the history
….json` file
  • Loading branch information
TooTallNate committed Mar 14, 2024
1 parent 26eb1c1 commit 1e53248
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/vercel-remix/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export function vercelPreset(): Preset {
let buildEnd: VitePluginConfig["buildEnd"] = ({
buildManifest,
remixConfig,
viteConfig
}) => {
if (entryServerPath) {
rmSync(entryServerPath);
Expand All @@ -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
Expand Down

0 comments on commit 1e53248

Please sign in to comment.