Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vercel): add support for specifying edge regions #1192

Merged
merged 3 commits into from
Apr 28, 2023
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Apr 26, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This allows specifying the regions for edge functions in Vercel, which can be beneficial to ensure they are running close to a DB (for example).

More info: https://vercel.com/docs/concepts/functions/edge-functions#edge-function-regions

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added enhancement New feature or request preset:vercel labels Apr 26, 2023
@danielroe danielroe requested a review from pi0 April 26, 2023 19:58
@danielroe danielroe self-assigned this Apr 26, 2023
@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #1192 (583ff2d) into main (46e3c3c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1192   +/-   ##
=======================================
  Coverage   77.20%   77.20%           
=======================================
  Files          67       67           
  Lines        6641     6642    +1     
  Branches      734      735    +1     
=======================================
+ Hits         5127     5128    +1     
  Misses       1513     1513           
  Partials        1        1           
Impacted Files Coverage Ξ”
src/presets/vercel.ts 93.84% <100.00%> (+0.02%) ⬆️

@danielroe danielroe marked this pull request as ready for review April 26, 2023 20:13
@ZainW
Copy link

ZainW commented Apr 26, 2023

Would it possible to also have the opt-in properties described here?ie. everything is serverless but on specific nuxt endpoints make them edge functions that way we can mix and match as well?

no worries if its out of scope

export const config = {
  runtime: 'edge', regions: 'iad1'
}

Copy link

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

src/presets/vercel.ts Outdated Show resolved Hide resolved
@danielroe
Copy link
Member Author

Would it possible to also have the opt-in properties described here?ie. everything is serverless but on specific nuxt endpoints make them edge functions that way we can mix and match as well?

@ZainW You can track this feature request via this issue: #1120

danielroe and others added 2 commits April 27, 2023 11:23
Co-authored-by: Yanick BΓ©langer <yanick.belanger@yahoo.com>
@pi0 pi0 merged commit f168b3c into main Apr 28, 2023
@pi0 pi0 deleted the feat/vercel-regions branch April 28, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preset:vercel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants