You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update guides and migration docs for Turbopack as default
Phase 2: Guides and Migration Documentation Updates
- Update Local Development Guide to show Turbopack as default
- Update Custom Server docs for turbo option behavior
- Update Create Next App CLI documentation
- Update CRA migration guide with new defaults and examples
- Replace --turbopack examples with --webpack opt-in patterns
🤖 Generated with Claude Code
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: docs/01-app/02-guides/local-development.mdx
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,15 +48,21 @@ On macOS, you can disable [Gatekeeper](https://support.apple.com/guide/security/
48
48
49
49
If you or your employer have configured any other Antivirus solutions on your system, you should inspect the relevant settings for those products.
50
50
51
-
### 2. Update Next.js and enable Turbopack
51
+
### 2. Update Next.js and use Turbopack
52
52
53
53
Make sure you're using the latest version of Next.js. Each new version often includes performance improvements.
54
54
55
-
Turbopack is a new bundler integrated into Next.js that can improve local performance.
55
+
Turbopack is now the default bundler for Next.js development and provides significant performance improvements over webpack.
56
56
57
57
```bash
58
58
npm install next@latest
59
-
npm run dev --turbopack
59
+
npm run dev # Turbopack is used by default
60
+
```
61
+
62
+
If you need to use Webpack instead of Turbopack, you can opt-in:
63
+
64
+
```bash
65
+
npm run dev --webpack
60
66
```
61
67
62
68
[Learn more about Turbopack](/blog/turbopack-for-development-stable). See our [upgrade guides](/docs/app/guides/upgrading) and codemods for more information.
@@ -146,7 +152,7 @@ Tailwind CSS version 3.4.8 or newer will warn you about settings that might slow
146
152
147
153
If you've added custom webpack settings, they might be slowing down compilation.
148
154
149
-
Consider if you really need them for local development. You can optionally only include certain tools for production builds, or explore moving to Turbopack and using[loaders](/docs/app/api-reference/config/next-config-js/turbopack#supported-loaders).
155
+
Consider if you really need them for local development. You can optionally only include certain tools for production builds, or explore using the default Turbopack bundler and configuring[loaders](/docs/app/api-reference/config/next-config-js/turbopack#supported-loaders) instead.
> **Note**: This will require disabling Turbopack by removing`--turbopack` from your `dev` script.
546
+
> **Note**: This will require using Webpack by adding`--webpack` to your `dev` script.
547
547
548
548
### TypeScript Setup
549
549
@@ -557,10 +557,16 @@ Next.js automatically sets up TypeScript if you have a `tsconfig.json`. Make sur
557
557
558
558
## Bundler Compatibility
559
559
560
-
Both Create React App and Next.js default to webpack for bundling. Next.js also offers [Turbopack](/docs/app/api-reference/config/next-config-js/turbopack) for faster local development with:
560
+
Create React App uses webpack for bundling. Next.js now defaults to [Turbopack](/docs/app/api-reference/config/next-config-js/turbopack) for faster local development:
561
561
562
562
```bash
563
-
next dev --turbopack
563
+
next dev # Uses Turbopack by default
564
+
```
565
+
566
+
To use Webpack instead (similar to CRA):
567
+
568
+
```bash
569
+
next dev --webpack
564
570
```
565
571
566
572
You can still provide a [custom webpack configuration](/docs/app/api-reference/config/next-config-js/webpack) if you need to migrate advanced webpack settings from CRA.
0 commit comments