bundler
A build tool, such as webpack, Rollup or Vite, that follows imports and combines modules into files a browser can load efficiently.
In more detail
Bundlers also remove unused code, split bundles and process CSS. They read a package's exports and sideEffects fields to pick files and decide what can be dropped.
Related terms
- tree shaking — Removing code that is exported but never imported from the final bundle, so less code is shipped.
- Rollup — A JavaScript bundler focused on ECMAScript modules, widely used to build libraries.
- webpack — A widely used JavaScript bundler that builds applications from modules, loaders and plugins.
- Vite — A fast frontend build tool and development server that serves ECMAScript modules directly during development.
- bundle — The files a build tool produces by combining an application's code and its libraries for the browser to download.
- JavaScript — The programming language of web browsers, also widely used on servers through Node.js.
- NEXT_PUBLIC_ prefix — The naming rule in Next.js where only environment variables starting with NEXT_PUBLIC_ are copied into browser code.
- next build — The Next.js command that compiles the app for production and pre-renders every route it can.
- esbuild — A very fast JavaScript and TypeScript bundler and transpiler written in Go.
- transpiler — A tool that translates source code into another language at a similar level, such as TypeScript into plain JavaScript.
- module resolution — How a runtime or tool turns the name in an import, such as ./util.js or express, into the exact file to load.
Taught in
- Component Packaging: Dual ESM/CJS Builds & Package Exports — Design Systems & Component Engineering
- Unified Build Pipelines: Caching & Dependency Graphs — Production Full-Stack Engineering
- Environment Configuration: Secrets & Multi-Stage — Production Full-Stack Engineering
- Type-Safe RPC Architectures: tRPC & Procedures — Production Full-Stack Engineering
- Client Components: use client & Hydration Models — Next.js 15 & Modern App Router Architecture
- Dynamic Routes: Slugs & generateStaticParams — Next.js 15 & Modern App Router Architecture
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture
- Verify Your Environment: Running tsc And Bun TypeScript — Production TypeScript
- ECMAScript Modules, CJS Interop And verbatimModuleSyntax — Production TypeScript