Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@vercel/config

Package Overview
Dependencies
Maintainers
335
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/config

A TypeScript SDK for programmatically generating Vercel configuration files

Source
npmnpm
Version
0.0.9
Version published
Weekly downloads
194K
15.16%
Maintainers
335
Weekly downloads
 
Created
Source

Vercel Router SDK

This is a prototype of what a Router SDK could look like.

Usage

  • Install the package: npm install @vercel/router

  • Create a router configuration file (e.g., router.config.ts):

import { createRouter } from "@vercel/router";

const router = createRouter();

router
  .rewrite("/api/(.*)", "/api/$1")
  .redirect("/old-docs", "/docs", { permanent: true })
  .cacheControl("/static/(.*)", {
    public: true,
    maxAge: "1week",
    immutable: true
  })
  .setCleanUrls(true);

export default router.getConfig();
  • Add the generate-config script to your package.json:
{
  "scripts": {
    "generate-config": "@vercel/router"
  }
}
  • Run the script to generate your vercel.json:
npm run generate-config

This will generate a vercel.json file in your project root with all your routing configurations.

FAQs

Package last updated on 12 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts