feat: [create-next-app] generate route types after setup (#82956)
## Run `next typegen` after project creation in create-next-app
### What?
This PR adds automatic type generation after a Next.js project is
created with create-next-app.
### Why?
Running `next typegen` immediately after project creation ensures that
route type definitions are available right away, improving the developer
experience by providing proper TypeScript support from the start.
### How?
- Added a new helper function `runTypegen()` that executes the local
Next.js binary with the `typegen` command
- Integrated this function into both the main app creation flow and the
template installation process
- Implemented error handling to ensure that typegen failures don't
interrupt the app creation process
---------
Co-authored-by:
Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
Showing
Please
register
or
sign in
to comment