module graph
The map of which files and packages import which, starting from your entry files.
In more detail
Each node is a file or package and each arrow an import. Bundlers walk it to build client bundles, and file tracing walks it to decide which files a deployment needs.
Example
Next.js output file tracing follows the module graph to fill the standalone folder.Related terms
- output file tracing — The build step where Next.js follows every import from your server code to find exactly which files are needed at runtime.
- bundler — A build tool, such as webpack, Rollup or Vite, that follows imports and combines modules into files a browser can load efficiently.
- module — A file of code whose functions, classes and variables other files can use by importing it.
Taught in
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture