Overview
The @nuxtjs/vercel-builder is a legacy builder designed for Nuxt 2 applications. It allows you to deploy a fast, production-ready Nuxt 2 application on the Vercel platform, with automatic scaling for SSR rendering. However, it is recommended to use Nuxt Bridge or Nuxt 3 for the latest Vercel features.
Features
- Serverless deployment: Deploys Nuxt 2 application as a serverless function on Vercel.
- Built-in caching: Caches node_modules and the global yarn cache for faster deployments.
- Multi-stage build: Ensures fast and small deployments.
Installation
To install and use the @nuxtjs/vercel-builder, follow these steps:
- Make sure you have a Nuxt application and a Vercel account.
- Create a
vercel.jsonfile at the root of your project. - Specify the necessary configuration options in the
vercel.jsonfile (e.g., serverFiles, internalServer, generateStaticRoutes, tscOptions). - Use the package manager used in your project (preferably yarn) to install the dependencies.
- Deploy your Nuxt application on Vercel.
Summary
The @nuxtjs/vercel-builder is a legacy builder specifically designed for Nuxt 2 SSR applications. It enables you to deploy your Nuxt 2 application as a serverless function on the Vercel platform, with caching and multi-stage build for optimized performance. However, it is recommended to migrate your app to Nuxt 3 for better integration with Vercel using their latest Build API.