You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to either add my own package manager or modify an existing package manager. This would allow users to customize the run command to use alternate methods of running. There could be some other use cases for customizing install or the other commands.
Motivation
I have been in progress of migrating a large monorepo from lerna 4 to nx. Our monorepo has around 50 packages that we build using typescript, which we are using the run-script executor to build. After switching to nx, I have noticed a noticeable slowdown. One of the performance issues is that default run-script executor uses the package manager to determine how to run the script. In our case we use yarn and thus yarn ${script} is used. However yarn is slower by ~1s compared to npx/npm yarnpkg/berry#2575. Our previous lerna implementation would always use npm instead of yarn when running commands. This is translating to a ~40s slowdown in our case when running our build (if nothing is cached).
Suggested Implementation
There would likely need to be a configuration in the nx.json to point to a package manager file. This would be akin to an executor.
Alternate Implementations
We could make an easier implementation for the specific use case using NX environment variables.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
Description
I would like to be able to either add my own package manager or modify an existing package manager. This would allow users to customize the run command to use alternate methods of running. There could be some other use cases for customizing install or the other commands.
Motivation
I have been in progress of migrating a large monorepo from lerna 4 to nx. Our monorepo has around 50 packages that we build using typescript, which we are using the run-script executor to build. After switching to nx, I have noticed a noticeable slowdown. One of the performance issues is that default run-script executor uses the package manager to determine how to run the script. In our case we use yarn and thus
yarn ${script}
is used. However yarn is slower by ~1s compared to npx/npm yarnpkg/berry#2575. Our previous lerna implementation would always use npm instead of yarn when running commands. This is translating to a ~40s slowdown in our case when running our build (if nothing is cached).Suggested Implementation
There would likely need to be a configuration in the nx.json to point to a package manager file. This would be akin to an executor.
Alternate Implementations
We could make an easier implementation for the specific use case using NX environment variables.
The text was updated successfully, but these errors were encountered: