Skip to content

Commit

Permalink
feat: added regions in config options
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvuka1 committed Feb 2, 2024
1 parent 9dff642 commit b6150c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"build": "tsup"
},
"dependencies": {
"@astrojs/internal-helpers": "^0.2.0",
"@astrojs/internal-helpers": "^0.2.1",
"@astrojs/vercel": "^4.0.3",
"esbuild": "^0.19.2",
"node": "^18.17.1"
Expand All @@ -86,13 +86,12 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/node": "^18.17.13",
"astro": "^4.0.4",
"bun-types": "latest",
"astro": "^4.3.2",
"bun-types": "^1.0.25",
"semantic-release": "^21.1.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
},
"peerDependencies": {
"astro": "^3.0.5"
}
"astro": "^4.3.2" }
}
3 changes: 3 additions & 0 deletions src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ export interface VercelEdgeConfig {
analytics?: boolean;
imageService?: boolean;
imagesConfig?: VercelImageConfig;
regions?: 'all' | string | string[];
}

const vercelEdge = ({
includeFiles = [],
analytics,
imageService,
imagesConfig,
regions,
}: VercelEdgeConfig = {}): AstroIntegration => {
let _config: AstroConfig;
let buildTempFolder: URL;
Expand Down Expand Up @@ -136,6 +138,7 @@ const vercelEdge = ({
// https://vercel.com/docs/build-output-api/v3#vercel-primitives/edge-functions/configuration
await writeJson(new URL(`./.vc-config.json`, functionFolder), {
runtime: 'edge',
regions,
entrypoint: relativePath(commonAncestor, entryPath),
});

Expand Down

0 comments on commit b6150c2

Please sign in to comment.