
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@vercel/config
Advanced tools
TypeScript SDK for programmatically defining Vercel configuration. Write type-safe routing rules and build configuration in TypeScript instead of JSON.
npm install @vercel/config
Create a vercel.ts file in your project root:
import { routes, deploymentEnv } from '@vercel/config/v1';
import type { VercelConfig } from '@vercel/config/v1';
export const config: VercelConfig = {
buildCommand: 'npm run build',
framework: 'nextjs',
rewrites: [
// Simple rewrite
routes.rewrite('/api/(.*)', 'https://backend.api.example.com/$1'),
// Rewrite with transforms (no path params)
routes.rewrite('/(.*)', 'https://api.example.com/$1', {
requestHeaders: {
authorization: `Bearer ${deploymentEnv('API_TOKEN')}`,
},
}),
// Type-safe path parameters with callback
routes.rewrite(
'/users/:userId/posts/:postId',
'https://api.example.com/users/$1/posts/$2',
({ userId, postId }) => ({
requestHeaders: {
'x-user-id': userId,
'x-post-id': postId,
authorization: `Bearer ${deploymentEnv('API_KEY')}`,
},
})
),
],
redirects: [routes.redirect('/old-docs', '/docs', { permanent: true })],
headers: [
routes.cacheControl('/static/(.*)', {
public: true,
maxAge: '1 week',
immutable: true,
}),
],
crons: [{ path: '/api/cleanup', schedule: '0 0 * * *' }],
};
:userId from patterns with full IntelliSensedeploymentEnv() for Vercel project env varsroutes.redirect(), routes.rewrite(), routes.header()has and missing conditionscompile and validate commands for developmentYour vercel.ts is automatically compiled to vercel.json during:
vercel build
vercel dev
vercel deploy
No manual build step needed - the Vercel CLI handles compilation automatically.
For development and validation:
# Compile vercel.ts to JSON (output to stdout)
npx @vercel/config compile
# Validate config for errors and show summary
npx @vercel/config validate
# Generate vercel.json locally (for development)
npx @vercel/config generate
vercel.ts and vercel.json.requestHeaders), they're compiled to the lower-level routes primitive internally.vercel.ts automatically.FAQs
A TypeScript SDK for programmatically configuring Vercel projects
The npm package @vercel/config receives a total of 168,572 weekly downloads. As such, @vercel/config popularity was classified as popular.
We found that @vercel/config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.