Nuxt 3,Vercel 仅部署一个边缘函数。

huangapple go评论54阅读模式
英文:

Nuxt 3, Vercel deploy only one edge function

问题

I have a Nuxt 3 app that I deployed on Vercel. I'm wondering if there's a way to deploy only one of my endpoints as an edge function, while the rest remain as serverless functions. I tried configuring it with runtime: "edge" but it didn't work, as all of them still seem to be serverless functions.

If I set the nitro preset, all of my functions become edge functions. However that's not what I want. I only need one endpoint to be an edge function.

Is that currently possible with Nuxt 3?

英文:

I have a Nuxt 3 app that I deployed on Vercel. I'm wondering if there's a way to deploy only one of my endpoints as an edge function, while the rest remain as serverless functions. I tried configuring it with 'runtime: "edge"'

export const config = {
  runtime: "edge",
}

but it didn't work, as all of them still seem to be serverless functions.

If I set the 'nitro' preset, all of my functions become edge functions. However that's not what I want. I only need one endpoint to be an edge function.

Is that currently possible with nuxt 3?

答案1

得分: 0

Nitro目前还不支持这种行为,但在他们的路线图中有提到,详见:https://github.com/unjs/nitro/issues/1120

英文:

Nitro is not supporting this kind of behavior yet but it's in their roadmap, see: https://github.com/unjs/nitro/issues/1120

huangapple
  • 本文由 发表于 2023年4月17日 17:05:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76033439.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定