mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Fix no edge functions deployed to netlify (#6793)
This commit is contained in:
parent
84a4648884
commit
1e3873c04a
3 changed files with 8 additions and 2 deletions
5
.changeset/strong-hairs-sort.md
Normal file
5
.changeset/strong-hairs-sort.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/netlify': patch
|
||||
---
|
||||
|
||||
fix: no edge functions deployed to netlify
|
|
@ -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',
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue