Skip to content

Commit 356a573

Browse files
committed
fix monorepo
1 parent 3a489ad commit 356a573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/open-next/src/build/createServerBundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ async function generateBundle(
122122

123123
// Create output folder
124124
const outputPath = path.join(outputDir, "server-functions", name);
125-
fs.mkdirSync(outputPath, { recursive: true });
126125

127126
// Resolve path to the Next.js app if inside the monorepo
128127
// note: if user's app is inside a monorepo, standalone mode places
@@ -131,6 +130,7 @@ async function generateBundle(
131130
// We need to output the handler file inside the package path.
132131
const isMonorepo = monorepoRoot !== appPath;
133132
const packagePath = path.relative(monorepoRoot, appBuildOutputPath);
133+
fs.mkdirSync(path.join(outputPath, packagePath), { recursive: true });
134134

135135
fs.copyFileSync(
136136
path.join(outputDir, ".build", "cache.cjs"),

0 commit comments

Comments
 (0)