diff --git a/packages/edge-bundler/node/formats/javascript.ts b/packages/edge-bundler/node/formats/javascript.ts index 0e7ae20962..5e669799ce 100644 --- a/packages/edge-bundler/node/formats/javascript.ts +++ b/packages/edge-bundler/node/formats/javascript.ts @@ -78,7 +78,7 @@ const getLocalEntryPoint = ( } ` }) - const bootCall = `boot(functions, metadata);` + const bootCall = `boot(() => functions, metadata);` return [bootImport, declaration, ...imports, bootCall].join('\n\n') } diff --git a/packages/edge-bundler/node/stage_2.test.ts b/packages/edge-bundler/node/stage_2.test.ts index 4658b260f1..414657a5da 100644 --- a/packages/edge-bundler/node/stage_2.test.ts +++ b/packages/edge-bundler/node/stage_2.test.ts @@ -14,8 +14,9 @@ test('`getLocalEntryPoint` returns a valid stage 2 file for local development', // This is a fake bootstrap that we'll create just for the purpose of logging // the functions and the metadata that are sent to the `boot` function. const printer = ` - export const boot = async (functions, metadata) => { + export const boot = async (getFunctions, metadata) => { const responses = {} + const functions = await getFunctions() for (const name in functions) { responses[name] = await functions[name]()