Skip to content

Commit

Permalink
Fix no edge functions deployed to netlify (#6793)
Browse files Browse the repository at this point in the history
  • Loading branch information
andremralves authored Apr 10, 2023
1 parent 84a4648 commit 1e3873c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-hairs-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/netlify': patch
---

fix: no edge functions deployed to netlify
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ export function netlifyEdgeFunctions({ dist }: NetlifyEdgeFunctionsOptions = {})
build: {
client: outDir,
server: new URL('./.netlify/edge-functions/', config.root),
serverEntry: 'entry.mjs',
// Netlify expects .js and will always interpret as ESM
serverEntry: 'entry.js',
},
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Deno.test({
async fn() {
let close = await runBuild('./fixtures/prerender/');
const { default: handler } = await import(
'./fixtures/prerender/.netlify/edge-functions/entry.mjs'
'./fixtures/prerender/.netlify/edge-functions/entry.js'
);
const response = await handler(new Request('http://example.com/index.html'));
assertEquals(response, undefined, 'No response because this is an asset');
Expand Down

0 comments on commit 1e3873c

Please sign in to comment.