vercel/next.js

Add option to enable Turbopack with `create-next-app`

leerob opened this issue · 8 comments

What is the update you wish to see?

create-next-app currently shows a list of options when setting up your Next.js application.

CleanShot 2024-05-18 at 09 14 41@2x

We'd like to add an option that matches the other style for Turbopack. It should default to No until it is stable. Please use the following format for the option:

Would you like to use Turbopack for next dev? (RC) … No / Yes

It's worth noting there are multiple different templates (e.g. App Router, non-App Router, Tailwind, non-Tailwind) and we'll need to make sure selecting this option works for all of them.

The specific code change needed is to change the package.json script for dev from next dev to next dev --turbo.

Is there any context that might help us understand?

The docs page should also be updated in the PR to include the new option.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/app/api-reference/create-next-app

The issue was marked with the good first issue label by a maintainer.

This means that it is a good candidate for someone interested in contributing to the project, but does not know where to start.

To get started, read the Contributing Guide. When you are ready, open a PR and link back to this issue in the form of adding Fixes #1234 to the PR description, where 1234 is the issue number. This will automatically close the issue when the PR gets merged, making it easier for us to keep track of what has been fixed.

Please remember to add tests to confirm your code changes will fix the issue and we do not regress in the future.

If you have any questions, feel free to ask below or on the PR. Generally, you don't need to @mention anyone directly, as we will get notified anyway and will respond as soon as we can.

Note

There is no need to ask for permission "can I work on this?" Please, go ahead if there is no linked PR 🙂

Woohoo! Thank you three, we can combine efforts now 😄

@mertcanaltin Hi, awesome work!! I'd propose combining to @Arindam200's PR as this "issue" was encouraging new contributors to Next.js!

Of course, we can combine it, everyone was great, thank you for your efforts ❤️

Thanks @devjiwonchoi @mertcanaltin for your Support!