Number 3 this week, ncc is a new tool created by the Zeit team to compile a Node.js project and all its dependencies into a single JavaScript file.
It can be useful when deploying applications to serveless environments (such as AWS Lambda or Azure Functions) to avoid uploading a deep tree of node_modules
files that contain a lot of irrelevant files (documentations, testsβ¦) and thus can be very heavy.
As an example, the GraphQL server example mentioned in the blog entry is compiled into a file that is 35 times smaller than the original files.
A bundler like Webpack or Rollup could accomplish a similar task but ncc does not require any configuration and supports TypeScript out of the box.
Any question or feedback? Reach us on GitHub.
Best of JavaScript is a project created by Michael Rambeau, made in Osaka, Japan.