BASE

ncc

ncc

Build / code quality tool · Free

Compiles a Node.js project and dependencies into compact deployment output: useful for CLIs, GitHub Actions, and server utilities.

Also known as: vercel/ncc; vercel-ncc

Resource illustration: ncc

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Prepare compact deployment output for a Node.js utility
  • Build it with dependencies and test the generated output's execution

Example workflow

A possible workflow; this is not a report of hands-on testing.

Prepare compact deployment output for a Node.js utility.

Before you start

  • A repository, package manifests, and configuration.
  • A compatible runtime and the target build command.

Steps

  1. Choose an entrypoint for the CLI, GitHub Action, or server utility.
  2. Build it with dependencies and test the generated output's execution.
  3. Add the workflow to scripts or CI with a clear report.

Check your result

  • A clean copy of the project reproduces the result.
  • Errors produce a nonzero exit code and clear diagnostics.

Choosing ncc

Prepare compact deployment output for a Node.js utility

Choose this when

  • Prepare compact deployment output for a Node.js utility
  • Build it with dependencies and test the generated output's execution

Requirements

  • Node.js input/output; TypeScript requires tsconfig.json.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.
  • Dynamically loaded files that cannot be identified statically may transfer incorrectly into output. ncc is not intended to bundle browser applications.

Frequently asked questions

What can you use for free in ncc?

Code and local use under MIT.

What additional costs might arise with ncc?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for ncc?

MIT for the code; dependencies have separate licenses.

How do you get started with ncc?

Choose an entrypoint for the CLI, GitHub Action, or server utility. Build it with dependencies and test the generated output's execution. Add the workflow to scripts or CI with a clear report.

When is ncc suitable for serverless, and which files may need separate processing?

ncc bundles a Node.js module and dependencies into compact output with TypeScript, ESM/CJS, source maps, and external module support. TypeScript builds require tsconfig.json. --asset-builds recursively builds nested JS assets; --license generates a separate license information file.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • ncc
  • build
  • Development

Sources

Other resources