Deploy Nuxt with Vercel
How to deploy a Nuxt app with Vercel?
Static site with Vercel
If you would like to deploy a static site on Vercel, no configuration is necessary. Vercel will detect that you are using Nuxt and will enable the correct settings for your deployment. For more information, see this Vercel guide .
SSR with Vercel
To deploy a serverless Nuxt runtime with Vercel , the Nuxt team and contributors have produced an official @nuxtjs/vercel-builder package.
All you have to do is to setup a vercel.json
file:
{
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/vercel-builder",
"config": {}
}
]
}
Check out the documentation for more information.
Service Worker with Nuxt PWA Module
To avoid 404 for Service Workers, make sure to include sw
to your routes settings.
{
"version": 2,
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/vercel-builder",
"config": {
"serverFiles": ["package.json"]
}
}
],
"routes": [
{
"src": "/sw.js",
"continue": true,
"headers": {
"Cache-Control": "public, max-age=0, must-revalidate",
"Service-Worker-Allowed": "/"
}
}
]
}
You can learn more and see examples on https://github.com/nuxt/vercel-builder
Edit this page on GitHub
Updated at Fri, Dec 23, 2022
Vinícius Alves
Kareem Dabbeet
Clément Ollivier
Valentín Costa
Ryan Skinner
Daniel Roe
Alex Hirzel
Ajeet Chaulagain
René Eschke
Sébastien Chopin
Nico Devs
Muhammad
Nazaré da Piedade
Naoki Hamada
Tom
Yann Aufray
Anthony Chu
Nuzhat Minhaz
Lucas Portet
Richard Schloss
Xanzhu
bpy
Antony Konstantinidis
Hibariya
Jose Seabra
Eze
Florian LEFEBVRE
Lucas
Julien SEIXAS
Hugo
Sylvain Marroufin
Spencer Cooley
Piotr Zatorski
Vladimir Semenov
Harry Allen
kazuya kawaguchi
Unai Mengual
Hyunseung Lee
Alexandre Chopin
pooya parsa
Nick Medrano
Mosaab Emam
Iljs Путлер Капут
Heitor Ramon Ribeiro
Nero
Yoon Han
Ikko Ashimine
FamCodings
Ayouli
F. Hinkelmann
felipesuri
Christophe Carvalho Vilas-Boas
Leoš Literák
Trizotti
Marcello Bachechi
Rodolphe
Thomas Underwood
Shek Evgeniy
Lukasz Formela