Unverified Commit 98e6fc58 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Update Turbopack docs (#63759)

## What?

Same as #63729. That branch was restacked strangely by the Graphite CLI.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-2948

---------
Co-authored-by: 's avatarAnthony Shew <anthonyshew@gmail.com>
parent 5bc2ceab
...@@ -114,7 +114,7 @@ next dev -H 192.168.1.2 ...@@ -114,7 +114,7 @@ next dev -H 192.168.1.2
### Turbopack ### Turbopack
[Turbopack](https://turbo.build/pack) (beta), our new bundler, which is being tested and stabilized in Next.js, helps speed up local iterations while working on your application. [Turbopack](/docs/architecture/turbopack) (beta), our new bundler, which is being tested and stabilized in Next.js, helps speed up local iterations while working on your application.
To use Turbopack in development mode, add the `--turbo` option: To use Turbopack in development mode, add the `--turbo` option:
......
...@@ -27,3 +27,30 @@ Turbopack in Next.js requires zero-configuration for most users and can be exten ...@@ -27,3 +27,30 @@ Turbopack in Next.js requires zero-configuration for most users and can be exten
## Unsupported features ## Unsupported features
Turbopack currently only supports `next dev` and does not support `next build`. We are currently working on support for builds as we move closer towards stability. Turbopack currently only supports `next dev` and does not support `next build`. We are currently working on support for builds as we move closer towards stability.
These features are currently not supported:
- [`webpack()`](/docs/app/api-reference/next-config-js/webpack) configuration in `next.config.js`
- Turbopack replaces Webpack, this means that webpack configuration is not supported.
- To configure Turbopack, [see the documentation](/docs/app/api-reference/next-config-js/turbo).
- A subset of [Webpack loaders](/docs/app/api-reference/next-config-js/turbo#webpack-loaders) are supported in Turbopack.
- Babel (`.babelrc`)
- Turbopack leverages the [SWC](/docs/architecture/nextjs-compiler#why-swc) compiler for all transpilation and optimizations. This means that Babel is not included by default.
- If you have a `.babelrc` file, you might no longer need it because Next.js includes common Babel plugins as SWC transforms that can be enabled. You can read more about this in the [compiler documentation](docs/architecture/nextjs-compiler#supported-features).
- If you still need to use Babel after verifying your particular use case is not covered, you can leverage Turbopack's [support for custom webpack loaders](/docs/app/api-reference/next-config-js/turbo#webpack-loaders) to include `babel-loader`.
- Creating a root layout automatically in App Router.
- This behavior is currently not supported since it changes input files, instead, an error will be shown for you manually add a root layout in the desired location.
- `@next/font` (legacy font support).
- `@next/font` is deprecated in favor of `next/font`. [`next/font`](/docs/app/building-your-application/optimizing/fonts) is fully supported with Turbopack.
- `new Worker('file', import.meta.url)`.
- We are planning to implement this in the future.
- [Relay transforms](/docs/architecture/nextjs-compiler#relay)
- We are planning to implement this in the future.
- `experimental.nextScriptWorkers`
- We are planning to implement this in the future.
- [AMP](/docs/pages/building-your-application/configuring/amp).
- We are currently not planning to support AMP in Next.js with Turbopack.
- Yarn PnP
- We are currently not planning to support Yarn PnP in Next.js with Turbopack.
- [`experimental.urlImports`](/docs/app/api-reference/next-config-js/urlImports)
- We are currently not planning to support `experimental.urlImports` in Next.js with Turbopack.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment