
5 min read
Edge-Side Rendering in Nuxt: Deployment and Trade-Offs
How edge-side rendering works in Nuxt, how Nitro presets target hosting platforms, and why database location and runtime compatibility matter.
Ask my AI assistantMichael Hoffmann
@mokkapps

A server-rendered Nuxt page needs a server to generate its HTML. If that server is far from the visitor, the request has further to travel. Edge-side rendering moves that work to a server location closer to the visitor.
In this article, I want to explain what changes when you render a Nuxt application at the edge, how Nitro's deployment presets fit in and which limitations to check before moving an app.
What Is Edge-Side Rendering?
With server-side rendering, Nuxt generates HTML for an incoming request. Edge-side rendering uses the same idea, but runs the server code across a provider's distributed locations instead of a single region.
Nuxt's rendering documentation explains the rendering modes. Nitro builds the server part of a Nuxt application for the chosen deployment target.
Serving static assets from a CDN doesn't mean the application uses edge-side rendering. A CDN can serve JavaScript, images and cached HTML while the server that generates new responses remains in one region. The difference is where the code for a dynamic request runs.
When Does It Help?
Rendering near the visitor can reduce the network time between the browser and the application server. It is worth considering for an application with visitors spread across several regions.
But the application server often needs other services. If every page request queries a database in Frankfurt, moving the rendering to a location near a visitor in Australia still leaves the database request travelling to Frankfurt. Several sequential database queries can make that distance more noticeable.
I would look at the full request before choosing a deployment target: browser to server, server to database and any external API calls. Moving only the renderer doesn't guarantee a faster page.
Deploying With Cloudflare Pages
Cloudflare Pages can run Nuxt's server code through its Functions integration. For an existing Pages project, connect a supported Git repository and use pnpm build as the build command when that script runs nuxt build. Use dist as the build output directory for the Pages preset.
Nuxt can detect the Pages build environment and choose the preset automatically. For a local build targeting Pages explicitly, use:
pnpm exec nuxt build --preset=cloudflare_pages
This creates the Pages deployment output, including the server entry for dynamic requests. Follow the Nuxt Cloudflare deployment guide for uploading that output or setting up the Git integration. Running the build locally doesn't deploy the app.
Use a server build if you need request-time rendering. nuxt generate produces prerendered pages, which is a different deployment even though both can serve content through Cloudflare's network.
Vercel and Netlify Presets
Nitro presets describe the output needed by a hosting platform. In the Nitro version used with Nuxt 3, the edge presets include vercel-edge and netlify-edge.
For example, a Nuxt 3 project targeting Netlify Edge Functions can declare its preset in the config:
export default defineNuxtConfig({
nitro: {
preset: 'netlify-edge',
},
})
Then build the app and deploy it using Netlify's deployment workflow:
pnpm build
Selecting a preset changes the server bundle. It doesn't create the hosting project, configure secrets or check whether every dependency works in that runtime. Verify those separately.
Check the guides for Vercel and Netlify against your installed Nuxt and Nitro versions. Preset names and platform recommendations can change, and a provider's default server deployment isn't necessarily an edge deployment. I would follow the provider's current recommendation when setting up a new app rather than copy an old preset unchanged.
Check Runtime Compatibility
An edge runtime may not provide the same APIs as a Node.js server. A package that reads local files, loads a native module or opens a database connection can need a different implementation. Available compatibility features depend on the provider and runtime configuration.
Start by checking your server dependencies. A successful build is useful, but also exercise the routes that use authentication, storage, email or a database in a deployed preview. Those requests can fail even when a basic page renders correctly.
Environment variables and secrets also need to be configured on the platform. Keep them in server-only runtime configuration and verify that the deployed app receives them.
Measure Before and After Moving
I wouldn't use a fixed cold-start number to decide whether an app belongs at the edge. Runtime startup, application code, cache state and external requests all affect the result. A small example from a framework benchmark doesn't tell us how a database-backed page will behave.
Compare the same routes from the regions your visitors use. Measure time to first byte and the time spent waiting for data. Test both cached and uncached requests, and check errors as well as successful responses.
Caching can remove more work than changing the server location. Public content may be suitable for prerendering or a shared cache. Personalized pages need different cache rules so one visitor's response isn't served to another. The Nuxt on the Edge article provides background on Nitro's approach, but deployment decisions still need measurements from your app.
Conclusion
I would consider edge-side rendering when the application can answer requests near its visitors without repeatedly calling a distant database. For an app tied to one database region, I would first compare it with running the server near that database.
Nitro makes building for different targets possible, but it doesn't remove runtime restrictions or network distance between services. I would choose the target after checking those dependencies and measuring representative requests.


