Skip to content

Commit 075cc96

Browse files
psyrenparkNicolas Dorseuil
andauthored
Fix edge functions bundle path (opennextjs#926)
* fix: correct edgeFunctions bundle path to server-functions directory Update bundle path from .open-next/functions to .open-next/server-functions to match the actual build output location for edge functions * feat: add additionalInject option support Add additionalInject: fnOptions.additionalInject for injecting code directly into the banner section during esbuild. Use with caution. * docs: update additionalInject option documentation Improve JSDoc comment to clarify usage for esbuild banner injection and add caution note for safe usage * changeset and remove additional inject --------- Co-authored-by: Nicolas Dorseuil <[email protected]>
1 parent f0ffff5 commit 075cc96

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/five-parrots-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/aws": patch
3+
---
4+
5+
Fix output for edge-functions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export async function generateOutput(options: BuildOptions) {
181181
Object.entries(config.functions ?? {}).forEach(async ([key, value]) => {
182182
if (value.placement === "global") {
183183
edgeFunctions[key] = {
184-
bundle: `.open-next/functions/${key}`,
184+
bundle: `.open-next/server-functions/${key}`,
185185
handler: indexHandler,
186186
...(await extractOverrideFn(value.override)),
187187
};

0 commit comments

Comments
 (0)