Socket
Socket
Sign inDemoInstall

@vercel/ncc

Package Overview
Dependencies
Maintainers
87
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/ncc

Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.


Version published
Weekly downloads
415K
decreased by-7.14%
Maintainers
87
Weekly downloads
 
Created

What is @vercel/ncc?

@vercel/ncc is a simple CLI tool used to compile a Node.js project into a single file, including all of its dependencies. This can be useful for reducing the complexity of deployment, improving startup time, and simplifying the distribution of Node.js applications.

What are @vercel/ncc's main functionalities?

Compile a Node.js project

This command compiles the Node.js project starting from 'src/index.js' and outputs the result to the 'dist' directory. The output will be a single JavaScript file that includes all dependencies.

ncc build src/index.js -o dist

Minify the output

This command compiles and minifies the Node.js project starting from 'src/index.js' and outputs the result to the 'dist' directory. Minification reduces the file size by removing unnecessary characters and whitespace.

ncc build src/index.js -o dist --minify

Source maps generation

This command compiles the Node.js project and generates source maps, which are useful for debugging. The source maps help map the minified code back to the original source code.

ncc build src/index.js -o dist --source-map

Watch mode

This command runs @vercel/ncc in watch mode, which means it will automatically recompile the project whenever a file changes. This is useful for development purposes.

ncc build src/index.js -o dist --watch

Other packages similar to @vercel/ncc

FAQs

Package last updated on 18 Dec 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc