-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(core): do not overwrite package.json start
script
#15091
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
fix(core): do not overwrite package.json start
script
#15091
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@ondrej-stanek-ozobot the ci did not run. could you rebase and push up again? |
4cf21b4
to
07a9d8a
Compare
@xiongemi , I rebased on latest mainline, but I am unsure if it resolved the problem. Can you please check? |
the pr looks good, but the ci did not get triggered, so checks are not done. the ci needs to be run before the merge. maybe just try to rebase again? |
07a9d8a
to
37b6879
Compare
@xiongemi , I rebased again, not sure if it helped. Could you please help to get the CI run completed? |
37b6879
to
ed9ce28
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Do not overwrite app's package.json
start
script if the app already defines it.Current Behavior
nx build <app>
doesn't fully respect the contents ofapps/<app>/package.json
. In particular, if the<app>
's package.json specifies custom script such as:The custom configuration is lost during
nx build <app>
and the generateddist/apps/<lib>/package.json
misses the custom port configuration:Expected Behavior
The file
dist/apps/<app>/package.json
should keep the custom start command, in this example it should be:The fix is simple and it is aligned with the existing logic for checking presence of
scripts
section.