Skip to content

Commit c8462de

Browse files
committed
Turbopack: Document automatic Babel config support
1 parent fdb2dc8 commit c8462de

2 files changed

Lines changed: 18 additions & 14 deletions

File tree

docs/01-app/03-api-reference/05-config/01-next-config-js/turbopack.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ The following options are available for the `turbopack` configuration:
5555

5656
The following loaders have been tested to work with Turbopack's webpack loader implementation, but many other webpack loaders should work as well even if not listed here:
5757

58-
- [`babel-loader`](https://www.npmjs.com/package/babel-loader)
58+
- [`babel-loader`](https://www.npmjs.com/package/babel-loader) [_(Configured automatically if a Babel configuration file is found)_](/docs/app/api-reference/turbopack#language-features)
5959
- [`@svgr/webpack`](https://www.npmjs.com/package/@svgr/webpack)
6060
- [`svg-inline-loader`](https://www.npmjs.com/package/svg-inline-loader)
6161
- [`yaml-loader`](https://www.npmjs.com/package/yaml-loader)
6262
- [`string-replace-loader`](https://www.npmjs.com/package/string-replace-loader)
6363
- [`raw-loader`](https://www.npmjs.com/package/raw-loader)
64-
- [`sass-loader`](https://www.npmjs.com/package/sass-loader)
64+
- [`sass-loader`](https://www.npmjs.com/package/sass-loader) [_(Configured automatically)_](/docs/app/api-reference/turbopack#css-and-styling)
6565
- [`graphql-tag/loader`](https://www.npmjs.com/package/graphql-tag)
6666

6767
## Examples

docs/01-app/03-api-reference/08-turbopack.mdx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ Turbopack in Next.js has **zero-configuration** for the common use cases. Below
3838

3939
### Language features
4040

41-
| Feature | Status | Notes |
42-
| --------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43-
| **JavaScript & TypeScript** | **Supported** | Uses SWC under the hood. Type-checking is not done by Turbopack (run `tsc --watch` or rely on your IDE for type checks). |
44-
| **ECMAScript (ESNext)** | **Supported** | Turbopack supports the latest ECMAScript features, matching SWC’s coverage. |
45-
| **CommonJS** | **Supported** | `require()` syntax is handled out of the box. |
46-
| **ESM** | **Supported** | Static and dynamic `import` are fully supported. |
47-
| **Babel** | Partially Unsupported | Turbopack does not include Babel by default. However, you can [configure `babel-loader` via the Turbopack config](/docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders). |
41+
| Feature | Status | Notes |
42+
| --------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43+
| **JavaScript & TypeScript** | **Supported** | Uses SWC under the hood. Type-checking is not done by Turbopack (run `tsc --watch` or rely on your IDE for type checks). |
44+
| **ECMAScript (ESNext)** | **Supported** | Turbopack supports the latest ECMAScript features, matching SWC’s coverage. |
45+
| **CommonJS** | **Supported** | `require()` syntax is handled out of the box. |
46+
| **ESM** | **Supported** | Static and dynamic `import` are fully supported. |
47+
| **Babel** | **Supported** | Starting in Next.js 16, Turbopack uses Babel automatically if it detects [a configuration file][babel-config]. Unlike in webpack, SWC is always used for Next.js's internal transforms and downleveling to older ECMAScript revisions. Next.js with webpack disables SWC if a Babel configuration file is present. Files in `node_modules` are excluded, unless you [manually configure `babel-loader`][manual-loader]. |
48+
49+
[babel-config]: https://babeljs.io/docs/config-files
50+
[manual-loader]: /docs/app/api-reference/config/next-config-js/turbopack#configuring-webpack-loaders
4851

4952
### Framework and React features
5053

@@ -220,8 +223,9 @@ Stay tuned for more updates as we continue to improve Turbopack and add producti
220223

221224
## Version Changes
222225

223-
| Version | Changes |
224-
| --------- | ---------------------------------- |
225-
| `v15.5.0` | Turbopack support for `build` beta |
226-
| `v15.3.0` | Experimental support for `build` |
227-
| `v15.0.0` | Turbopack for `dev` stable |
226+
| Version | Changes |
227+
| --------- | -------------------------------------------------------------- |
228+
| `v16.0.0` | Automatic support for Babel when a configuration file is found |
229+
| `v15.5.0` | Turbopack support for `build` beta |
230+
| `v15.3.0` | Experimental support for `build` |
231+
| `v15.0.0` | Turbopack for `dev` stable |

0 commit comments

Comments
 (0)