{"name":"@vercel/ncc","description":"Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.","version":"0.45.0","repository":{"type":"git","url":"git+https://github.com/vercel/ncc.git"},"license":"MIT","main":"./dist/ncc/index.js","bin":{"ncc":"dist/ncc/cli.js"},"scripts":{"build":"node scripts/build.js","build-test-binary":"cd test/binary && node-gyp rebuild && cp build/Release/hello.node ../integration/hello.node","test":"node --expose-gc --max_old_space_size=4096 node_modules/jest/bin/jest.js","test-coverage":"node --expose-gc --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --coverage --globals \"{\\\"coverage\\\":true}\"","prepublishOnly":"node scripts/build.js --no-cache"},"devDependencies":{"@aws-sdk/client-s3":"^3.787.0","@azure/cosmos":"^3.17.3","@bugsnag/js":"^7.21.0","@ffmpeg-installer/ffmpeg":"^1.0.17","@google-cloud/bigquery":"^8.3.1","@google-cloud/firestore":"^6.7.0","@sentry/node":"^7.66.0","@slack/web-api":"^6.9.0","@types/node":"^25.9.0","@vercel/webpack-asset-relocator-loader":"1.10.3","analytics-node":"^6.2.0","apollo-server-express":"^2.2.2","arg":"^5.0.2","auth0":"^4.37.0","axios":"^1.7.7","azure-storage":"^2.10.2","browserify-middleware":"^8.1.1","bytes":"^3.1.2","canvas":"^3.2.1","chromeless":"^1.5.2","consolidate":"^0.16.0","copy":"^0.3.2","core-js":"^2.5.7","cowsay":"^1.3.1","esm":"^3.2.22","express":"^4.18.2","fetch-h2":"^3.0.2","firebase":"^7.24.0","firebase-admin":"^11.10.1","fluent-ffmpeg":"^2.1.2","fontkit":"^1.7.7","get-folder-size":"^2.0.0","glob":"^8.0.3","got":"^12.5.2","graceful-fs":"^4.2.11","graphql":"^15.5.1","hot-shots":"^8.5.0","ioredis":"^5.3.2","isomorphic-unfetch":"^4.0.2","jest":"^27.5.1","jimp":"^0.16.1","jugglingdb":"2.0.1","koa":"^3.0.1","leveldown":"^6.0.0","license-webpack-plugin":"^4.0.2","lighthouse":"^8.1.0","loopback":"^3.24.0","mailgun":"^0.5.0","mariadb":"^2.0.1-beta","memcached":"^2.2.2","memory-fs":"^0.5.0","mkdirp":"^1.0.4","mongoose":"^8.8.3","mysql":"^2.16.0","nan":"^2.27.0","node-gyp":"^12.3.0","oracledb":"^6.1.0","passport":"^0.6.0","passport-google-oauth":"^2.0.0","path-platform":"^0.11.15","pdfkit":"^0.13.0","pg":"^8.11.3","pug":"^3.0.1","react":"^17.0.2","react-dom":"^17.0.2","redis":"^3.1.1","request":"^2.88.0","resolve":"^1.22.12","rimraf":"^6.1.3","rxjs":"^7.8.1","saslprep":"^1.0.2","sequelize":"^6.32.1","sharp":"^0.32.5","shebang-loader":"^0.0.1","socket.io":"^4.7.2","source-map-support":"^0.5.9","stripe":"^8.167.0","swig":"^1.4.2","terser":"^5.33.0","the-answer":"^1.0.0","tiny-json-http":"^7.5.1","ts-loader":"^9.5.7","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","twilio":"^3.23.2","typescript":"^5.2.2","vm2":"^3.11.5","vue":"^2.5.17","vue-server-renderer":"^2.5.17","web-vitals":"^0.2.4","webpack":"5.94.0","when":"^3.7.8"},"packageManager":"pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319","publishConfig":{"access":"public"},"gitHead":"cb1f1f058bfa7de4cb63f2411e14a724e714e260","_id":"@vercel/ncc@0.45.0","bugs":{"url":"https://github.com/vercel/ncc/issues"},"homepage":"https://github.com/vercel/ncc#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-8zPi1yO2mHpoKTD+e+Bf0ZT3e+sWHSOyGapm9s7b5R0gxJi3CiFTqmeQiMEyu6ejrz2s09M8JkEoUaTWjBJPQQ==","shasum":"e1e2424d9eb0dbb3a8fa7067e36e0da96d42a316","tarball":"http://registry-npm.ywwl.com/@vercel/ncc/download/@vercel/ncc-0.45.0.tgz","fileCount":136,"unpackedSize":18634243,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vercel%2fncc@0.45.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDCy7tGxHM00hB6xp9G+y8bWRyx5FvuqMOals+lkyeWtAiEAu7dxUqkhpD7WVBs+kNOt9iSjnlkjauucSvVNZClKjq0="}],"size":4074741,"noattachment":false,"key":"/@vercel/ncc/-/@vercel/ncc-0.45.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:421fbd4c-e00b-4a5a-a3b5-1fe56059c20c"}},"directories":{},"maintainers":[{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"matt.straka","email":"matt.j.straka@gmail.com"},{"name":"vercel-release-bot","email":"infra+release@vercel.com"},{"name":"zeit-bot","email":"team@zeit.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ncc_0.45.0_1786591259496_0.34438226697781915"},"_hasShrinkwrap":false,"readme":"# ncc\n\n[![CI Status](https://github.com/vercel/ncc/actions/workflows/ci.yml/badge.svg)](https://github.com/vercel/ncc/actions/workflows/ci.yml)\n\nSimple CLI for compiling a Node.js module into a single file,\ntogether with all its dependencies, gcc-style.\n\n## Motivation\n\n- Publish minimal packages to npm\n- Only ship relevant app code to serverless environments\n- Don't waste time configuring bundlers\n- Generally faster bootup time and less I/O overhead\n- Compiled language-like experience (e.g.: `go`)\n\n## Design goals\n\n- Zero configuration\n- TypeScript built-in\n- Only supports Node.js programs as input / output\n- Support all Node.js patterns and npm modules\n\n## Usage\n\n### Installation\n```bash\nnpm i -g @vercel/ncc\n```\n\n### Usage\n\n```bash\n$ ncc <cmd> <opts>\n```\nEg:\n```bash\n$ ncc build input.js -o dist\n```\n\nIf building an `.mjs` or `.js` module inside a `\"type\": \"module\"` [package boundary](https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#packages_package_json_and_file_extensions), an ES module output will be created automatically.\n\nOutputs the Node.js compact build of `input.js` into `dist/index.js`.\n\n> Note: If the input file is using a `.cjs` extension, then so will the corresponding output file.\n> This is useful for packages that want to use `.js` files as modules in native Node.js using\n> a `\"type\": \"module\"` in the package.json file.\n\n#### Commands:\n```\n  build <input-file> [opts]\n  run <input-file> [opts]\n  cache clean|dir|size\n  help\n  version\n```\n\n#### Options:\n```\n  -o, --out [dir]          Output directory for build (defaults to dist)\n  -m, --minify             Minify output\n  -C, --no-cache           Skip build cache population\n  -s, --source-map         Generate source map\n  -a, --asset-builds       Build nested JS assets recursively, useful for\n                           when code is loaded as an asset eg for workers.\n  --no-source-map-register Skip source-map-register source map support\n  -e, --external [mod]     Skip bundling 'mod'. Can be used many times\n  -q, --quiet              Disable build summaries / non-error outputs\n  -w, --watch              Start a watched build\n  -t, --transpile-only     Use transpileOnly option with the ts-loader\n  --v8-cache               Emit a build using the v8 compile cache\n  --license [file]         Adds a file containing licensing information to the output\n  --stats-out [file]       Emit webpack stats as json to the specified output file\n  --target [es]            ECMAScript target to use for output (default: es2015)\n                           Learn more: https://webpack.js.org/configuration/target\n  -d, --debug              Show debug logs\n```\n\n### Execution Testing\n\nFor testing and debugging, a file can be built into a temporary directory and executed with full source maps support with the command:\n\n```bash\n$ ncc run input.js\n```\n\n### With TypeScript\n\nThe only requirement is to point `ncc` to `.ts` or `.tsx` files. A `tsconfig.json`\nfile is necessary. Most likely you want to indicate `es2015` support:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"es2015\",\n    \"moduleResolution\": \"node\"\n  }\n}\n```\n\nIf typescript is found in `devDependencies`, that version will be used.\n\n### Package Support\n\nSome packages may need some extra options for ncc support in order to better work with the static analysis.\n\nSee [package-support.md](package-support.md) for some common packages and their usage with ncc.\n\n### Programmatically From Node.js\n\n```js\nrequire('@vercel/ncc')('/path/to/input', {\n  // provide a custom cache path or disable caching\n  cache: \"./custom/cache/path\" | false,\n  // externals to leave as requires of the build\n  externals: [\"externalpackage\"],\n  // directory outside of which never to emit assets\n  filterAssetBase: process.cwd(), // default\n  minify: false, // default\n  sourceMap: false, // default\n  assetBuilds: false, // default\n  sourceMapBasePrefix: '../', // default treats sources as output-relative\n  // when outputting a sourcemap, automatically include\n  // source-map-support in the output file (increases output by 32kB).\n  sourceMapRegister: true, // default\n  watch: false, // default\n  license: '', // default does not generate a license file\n  target: 'es2015', // default\n  v8cache: false, // default\n  quiet: false, // default\n  debugLog: false // default\n}).then(({ code, map, assets }) => {\n  console.log(code);\n  // Assets is an object of asset file names to { source, permissions, symlinks }\n  // expected relative to the output code (if any)\n})\n```\n\nWhen `watch: true` is set, the build object is not a promise, but has the following signature:\n\n```js\n{\n  // handler re-run on each build completion\n  // watch errors are reported on \"err\"\n  handler (({ err, code, map, assets }) => { ... })\n  // handler re-run on each rebuild start\n  rebuild (() => {})\n  // close the watcher\n  void close ();\n}\n```\n\n## Caveats\n\n- Files / assets are relocated based on a [static evaluator](https://github.com/vercel/webpack-asset-relocator-loader#how-it-works). Dynamic non-statically analyzable asset loads may not work out correctly\n","publish_time":1786591259748,"_cnpm_publish_time":1786591259748,"dist-tags":{"latest":"0.45.0"}}