mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
feat: add support for astro:env to node and vercel (#11199)
This commit is contained in:
parent
3b9ff01794
commit
5654523dd7
3 changed files with 8 additions and 0 deletions
|
@ -98,6 +98,7 @@ function getAdapter({
|
|||
isSquooshCompatible: true,
|
||||
},
|
||||
i18nDomains: 'experimental',
|
||||
envGetSecret: 'experimental',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,6 +8,12 @@ import {
|
|||
ASTRO_PATH_PARAM,
|
||||
} from './adapter.js';
|
||||
|
||||
// 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(() => {});
|
||||
|
||||
applyPolyfills();
|
||||
|
||||
export const createExports = (
|
||||
|
|
|
@ -32,6 +32,7 @@ function getAdapter(): AstroAdapter {
|
|||
staticOutput: 'stable',
|
||||
serverOutput: 'unsupported',
|
||||
hybridOutput: 'unsupported',
|
||||
envGetSecret: 'unsupported',
|
||||
},
|
||||
adapterFeatures: {
|
||||
edgeMiddleware: false,
|
||||
|
|
Loading…
Add table
Reference in a new issue