-
Notifications
You must be signed in to change notification settings - Fork 26.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to enable Turbopack with create-next-app
#65924
Comments
The issue was marked with the 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 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 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! |
This PR addresses an issue where the `dev` script in `package.json` was not correctly updated to use the `--turbo` option when specified. The changes ensure that the `dev` script is set to `next dev --turbo` if the `turbo` option is enabled. ### Changes: 1. **Function Modification**: - Updated the `modifyPackageJson` function to include a check for the `turbo` parameter. - If `turbo` is true, the `dev` script in `package.json` is set to `next dev --turbo`. - If `turbo` is false, the `dev` script remains `next dev`. 2. **Integration in App Creation**: - Integrated the `modifyPackageJson` function into the app creation process to ensure the `dev` script is correctly set based on the `turbo` parameter. ### Testing: - Verified that the `dev` script in `package.json` is correctly updated to `next dev --turbo` when the `turbo` option is enabled. - Ensured that the `dev` script remains `next dev` when the `turbo` option is not enabled. ### Related Issues: - Fixes #65924 ### Notes: - This change ensures that developers opting to use Turbopack for development will have the correct script set up automatically. --------- Signed-off-by: Arindam Majumder <arindammajumder2020@gmail.com> Co-authored-by: Lee Robinson <me@leerob.io> Co-authored-by: devjiwonchoi <devjiwonchoi@gmail.com> Co-authored-by: Jiachi Liu <inbox@huozhi.im> Co-authored-by: Sam Ko <sam@vercel.com>
We did it! Thank you all so much 🥳 |
We are the future |
What is the update you wish to see?
create-next-app
currently shows a list of options when setting up your Next.js application.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:
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 fordev
fromnext dev
tonext 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 text was updated successfully, but these errors were encountered: