-
Notifications
You must be signed in to change notification settings - Fork 934
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
[WORKSPACE] How can we install dependencies needed only #8837
Comments
Can you elaborate more on the use-case why all these dependencies are in workspace.jsonc although they're not in use? |
The idea is that we are trying to build the best dev experience about workspace management for our team. The solution you do propose could be cool but how could we indicate that we want a specific version of dependencies ? We couldn't just get the latest one available ;) (and aliases etc) We thought about something that bit can install only app/component we would want to limit the dependencies install for build production for eg. |
So if I understand correctly, you have like a pool of dependencies with specific versions that you want @GiladShoham @zkochan , maybe you guys have an idea. |
You can do something like create a temp workspace and bring only the app component into it (bit import it). Then it will only install its dependencies. |
Thanks for the suggestions !
For the moment what I am trying on is:
I think that this way I am cleaning the useless element for production build and have the minimum required. |
Your method that you are trying to do now, will not work. |
Thanks for this explication ! |
So here is a script I did for our project
In the end by running you should get only needed deps for an app and re-running
"pino-pretty": "npm:[email protected]",
"commander": "^12.0.0",
"chalk": "^5.3.0",
"redis": "^2.8.0",
"redislatest": "npm:redis@latest",
"twilio": "^4.11.2",
"uuid": "^9.0.1",
"wrtc": "npm:@avahq/[email protected]" It's usefull because in the end it prevent you to have one package.json per apps/packages but manage them globally and in a prod container only get the needed deps per app , that means you can have a monorepo workspace with micro service |
Description
We have a project with multi app/components
In the end we want to only install deps needed by one package in a Dockerfile .
To have the simplest dev Experience we have pu all the deps of all app/package inside workspace.jsonc root dependencies (not specified for a component)
So in our Dockerfile we does not mount the bitmap, but we do
bit init; bit add $component
But doing
bit install
install all the dependencies insideworkspace.jsonc
Thanks to
bit show $component
we know which package must be installed for a package But is there a way to only install the one really needed for our production build ? (to resume install the needed package of available apps an no more (like from what returnbit show app
) with version specified insideworkspace.jsonc
)Thanks
Specifications
The text was updated successfully, but these errors were encountered: