diff options
author | 2024-11-28 13:25:52 +0000 | |
---|---|---|
committer | 2024-11-28 13:25:52 +0000 | |
commit | ff8b08f05c67178192d40ae80e399e6a4cefea7b (patch) | |
tree | e5d73c4739571a614af13d8f327b274fadcb61bc /packages/integrations/netlify/src/ssr-function.ts | |
parent | 90276e623fd7c76cee59389b7a86c9d7b173a842 (diff) | |
parent | 7279223789626c67d399407bc7602179b125803a (diff) | |
download | astro-ff8b08f05c67178192d40ae80e399e6a4cefea7b.tar.gz astro-ff8b08f05c67178192d40ae80e399e6a4cefea7b.tar.zst astro-ff8b08f05c67178192d40ae80e399e6a4cefea7b.zip |
Merge pull request #451 from withastro/next
Diffstat (limited to 'packages/integrations/netlify/src/ssr-function.ts')
-rw-r--r-- | packages/integrations/netlify/src/ssr-function.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/packages/integrations/netlify/src/ssr-function.ts b/packages/integrations/netlify/src/ssr-function.ts index 22925ddaa..5ea2e97f1 100644 --- a/packages/integrations/netlify/src/ssr-function.ts +++ b/packages/integrations/netlify/src/ssr-function.ts @@ -1,15 +1,12 @@ +// Keep at the top +import './polyfill.js'; + import type { Context } from '@netlify/functions'; import type { SSRManifest } from 'astro'; import { App } from 'astro/app'; -import { applyPolyfills } from 'astro/app/node'; - -applyPolyfills(); +import { setGetEnv } from 'astro/env/setup'; -// Won't throw if the virtual module is not available because it's not supported in -// the users's astro version or if astro:env is not enabled in the project -await import('astro/env/setup') - .then((mod) => mod.setGetEnv((key) => process.env[key])) - .catch(() => {}); +setGetEnv((key) => process.env[key]); export interface Args { middlewareSecret: string; |