Side by side
Turbopack vs webpack
Both stand on javascript build tools. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan LinuxMacWindows
Choose Turbopack for local development in Next.js when its supported languages, framework features, and styling options fit your project. Look elsewhere or plan additional tooling if you need webpack plugins or want the bundler itself to perform TypeScript type checking.
Visit Turbopack Free plan APISelf-hostedWeb
webpack provides bundling, transformation, and extension interfaces for application builds. It is a low-level tool, and users should account for its installation requirements and experimental native CSS and HTML support.
Visit webpackThe facts
| Turbopack | webpack | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Linux, Mac, Windows | API, Self-hosted, Web |
| Lowest paid plan | Free or on request | Free or on request |
| Plans published | 1 | 1 |
| Maker | Not published | Not published |
| Website | nextjs.org | webpack.js.org |
| On javascript build tools | #18 of 27 | #22 of 27 |
Turbopack: what it does well
- Included in Next.js with no separate price stated.
- Default bundler for basic Next.js use without configuration.
- Caches results at function level and persists them between runs.
- Supports both the Pages Router and App Router.
- Native bindings cover macOS, Windows, and Linux on x64 and ARM64.
What to know first
- Webpack plugins are unsupported.
- TypeScript type checking is not performed.
- Custom Sass functions are unsupported.
- Yarn Plug'n'Play and experimental URL imports are not planned for support.
webpack: what it does well
- Code splitting supports on-demand loading.
- Loaders transform sources such as Sass and TypeScript.
- ModuleFederationPlugin supports runtime module sharing.
- Free open-source software under the MIT license.
What to know first
- Command-line use from webpack v4 onward requires webpack-cli.
- CSP is not enabled by default.
- Native CSS and HTML support are experimental.
Alternatives to Turbopack Alternatives to webpack The whole list
