diff options
author | 2024-09-12 17:34:59 +0200 | |
---|---|---|
committer | 2024-09-12 17:34:59 +0200 | |
commit | 8d897e29157ace53997b79ec79497df185eee13a (patch) | |
tree | 78dc01384334826b7d08b475a97f28b2d860032b /packages/integrations/netlify/src/ssr-function.ts | |
parent | 2982ef133c77504d35f47b784148961e139735c8 (diff) | |
download | astro-8d897e29157ace53997b79ec79497df185eee13a.tar.gz astro-8d897e29157ace53997b79ec79497df185eee13a.tar.zst astro-8d897e29157ace53997b79ec79497df185eee13a.zip |
chore(next): astro:env cleanup (#385)
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; |