Skip to content

Commit

Permalink
fix: build with custom public dir
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarv committed Dec 5, 2024
1 parent 4fe0d72 commit e08035d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-server/lib/build/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ export default async function serverBuild(root, options) {
return false;
};

const publicDir =
typeof config.public === "string" ? config.public : "public";
const buildConfig = {
root: cwd,
configFile: false,
Expand Down Expand Up @@ -232,6 +234,7 @@ export default async function serverBuild(root, options) {
externalConditions: ["react-server"],
},
},
publicDir: join(cwd, publicDir),
};

let viteConfig = buildConfig;
Expand Down

0 comments on commit e08035d

Please sign in to comment.