Skip to content

Commit

Permalink
fix(react): do not overwrite package.json start script (#15091)
Browse files Browse the repository at this point in the history
Co-authored-by: Ondrej Stanek <ondrej@ostan.cz>
  • Loading branch information
ondrej-stanek-ozobot and ondrej-stanek-ozobot committed Feb 24, 2023
1 parent 52a62a4 commit 00c858e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/next/src/executors/build/lib/update-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export function updatePackageJson(
if (!packageJson.scripts) {
packageJson.scripts = {};
}
packageJson.scripts.start = 'next start';
if (!packageJson.scripts.start) {
packageJson.scripts.start = 'next start';
}

const typescriptNode = context.projectGraph.externalNodes['npm:typescript'];
if (typescriptNode) {
Expand Down

0 comments on commit 00c858e

Please sign in to comment.