create-next-app: remove App Router prompt and always use App Router (#100850)
`create-next-app` no longer asks "Would you like to use App Router? (recommended)". New projects always use the App Router. **Why** The App Router is the recommended default, and the interactive prompt only offered a way to pick the Pages Router by accident. A saved `app: false` preference from an earlier run also kept silently producing Pages Router projects. **Approach** - Remove the App Router toggle prompt and set `opts.app = true` unless `--no-app` or `--api` is passed. - Drop `app` from the defaults/preferences display, so the "recommended defaults" and "reuse previous settings" summaries no longer list "App Router" / "Pages Router". - Saved `app` preferences are ignored. `--no-app` remains as the explicit opt-out, so the existing Pages templates and their tests are unchanged. **Validation** - `prompts.test.ts`: removed the App Router prompt from the customize flow; the "reuse previous settings" test with a saved `app: false` now expects an `app/` directory. - Type-checked `packages/create-next-app/index.ts` with no new errors. The create-next-app e2e tests were not run locally. **Docs** Removed the prompt line and "App Router" from the recommended defaults summary in the installation guide and the `create-next-app` CLI reference. --------- Co-authored-by:roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com> Co-authored-by:
Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment