-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add option to enable Turbopack with create-next-app (#65926)
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 <[email protected]> Co-authored-by: Lee Robinson <[email protected]> Co-authored-by: devjiwonchoi <[email protected]> Co-authored-by: Jiachi Liu <[email protected]> Co-authored-by: Sam Ko <[email protected]>
- Loading branch information
1 parent
0eedddb
commit 60ad8af
Showing
15 changed files
with
343 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.