Skip to content

Commit

Permalink
Do not break build when appDir is enabled but empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Serpa committed Mar 25, 2023
1 parent 05f6de1 commit ebcd550
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,10 @@ export default async function build(
),
{ overwrite: true }
)
if (appDir) {
if (
appDir &&
(await fileExists(path.join(distDir, SERVER_DIRECTORY, 'app')))
) {
await recursiveCopy(
path.join(distDir, SERVER_DIRECTORY, 'app'),
path.join(
Expand Down

0 comments on commit ebcd550

Please sign in to comment.