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
This PR adds a new `reactCompiler` option to create-next-app. To provide
more time for build perf measurements, this option defaults to "no" for
now.
When React Compiler is enabled, create-next-app will:
1. Add the experimental config enabling the compiler to next.config
2. Install babel-plugin-react-compiler, pinned to the latest rc 19.1.0-rc.2
Test plan:
Double checked that the generated next.config.ts contains the flag and
that babel-plugin-react-compiler was installed as a devDep.
**OFF**
```
$ pnpm build
$ dist/index.js
✔ What is your project named? … my-app
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use React Compiler (Release Candidate)? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like your code inside a `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to use Turbopack for `next dev`? … No / Yes
✔ Would you like to customize the import alias (`@/*` by default)? … No / Yes
Creating a new Next.js app in /Users/laurentan/code/next.js/packages/create-next-app/my-app.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- react
- react-dom
- next
Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- @tailwindcss/postcss
- tailwindcss
- eslint
- eslint-config-next
- @eslint/eslintrc
<snip>
Success! Created my-app at my-app
```
**ON**
```
$ pnpm build
$ dist/index.js
✔ What is your project named? … my-app
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use React Compiler (Release Candidate)? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like your code inside a `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to use Turbopack for `next dev`? … No / Yes
✔ Would you like to customize the import alias (`@/*` by default)? … No / Yes
Creating a new Next.js app in /Users/laurentan/code/next.js/packages/create-next-app/my-app.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- react
- react-dom
- next
Installing devDependencies:
- babel-plugin-react-compiler
- typescript
- @types/node
- @types/react
- @types/react-dom
- @tailwindcss/postcss
- tailwindcss
- eslint
- eslint-config-next
- @eslint/eslintrc
<snip>
Success! Created my-app at my-app
```
0 commit comments