Features
The practice of building web applications is enormously diverse. In CSS alone, you have SCSS, Less, CSS Modules, PostCSS, and hundreds of other libraries. Frameworks like React, Vue and Svelte require custom setups.
When building a bundler, we needed to consider which features would be:
- Built-in: they work out of the box, no config required
- Available via plugins: usually installed from a registry and configured
- Unavailable: not available at all
Turbopack is in beta, so very few of these decisions are set in stone. In its current state, Turbopack cannot yet be configured - so plugins are not available yet.
Let's discuss which features are available out-of-the-box, in Turbopack's default configuration. We'll also touch on features which will be configurable via plugins.
JavaScript
All ESNext features, Browserslist and top-level await.
TypeScript
TypeScript out of the box, including resolving paths and baseUrl.
Imports
require, import, dynamic imports, and more.
Dev server
Hot Module Reloading (HMR) and Fast Refresh.
CSS
Global CSS, CSS Modules, postcss-nested, and @import.
Frameworks
Next.js, Svelte, Vue, and React Server Components
Static assets
/public directory, JSON imports, and importing assets via ESM.