ncc

Compile Node.js applications into a single JavaScript file with @vercel/ncc.

2|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/NagyVikt/codex-plugins --skill ncc-nagyvikt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ncc
Source: https://github.com/NagyVikt/codex-plugins/tree/main/plugins/vercel/skills/ncc
Command: npx skills add https://github.com/NagyVikt/codex-plugins --skill ncc-nagyvikt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the complexity of managing large node_modules directories in production environments by bundling your entire Node.js application and its dependencies into a single, portable file.

Core Features & Use Cases

  • Serverless Optimization: Package serverless functions into a single file to reduce cold starts and deployment size.
  • CLI Distribution: Create self-contained executable files for Node.js CLI tools without requiring users to run npm install.
  • Docker Efficiency: Minimize Docker image sizes by eliminating the need to copy and install node_modules during the build process.

Quick Start

Use the ncc skill to compile the file index.js into a single bundle located in the dist directory.

Frequently Asked Questions about ncc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bundle Node.js dependencies into a single file for serverless deployment?

You can bundle Node.js dependencies into a single file by using the ncc CLI to perform static analysis and dependency inlining, creating a self-contained JavaScript file. This reduces deployment size and cold starts for serverless functions.

What is the best way to distribute a Node.js CLI tool without requiring npm install?

The best way to distribute a Node.js CLI tool without npm install is compiling your application into a self-contained executable file. This eliminates the need for users to manage node_modules directories, packaging all dependencies into one portable file.

Does bundling Node.js applications with @vercel/ncc work for optimizing Docker image sizes?

Yes, bundling Node.js applications with @vercel/ncc works for Docker optimization by eliminating the need to copy and install node_modules during the build process. This minimizes the final Docker image size by using a single bundled file.

Do I need a specific environment to compile Node.js modules into a single-file bundle?

Yes, you need a Node.js environment and the @vercel/ncc package to compile Node.js modules. The tool uses this environment to perform static analysis and dependency inlining, generating a self-contained JavaScript file in your dist directory.

Why does my Node.js serverless function have a large deployment size with many node_modules?

Your Node.js serverless function has a large deployment size due to managing complex node_modules directories in production. You can solve this by bundling the application and its dependencies into a single, portable JavaScript file to reduce overall size.