zbpack
zbpack copied to clipboard
[feature] Better pnpm workspace support
Is your feature request related to a problem? Please describe.
In my full-stack pnpm monorepo project, I use the following structure to manage my project.
root
├── packages/
│ ├─ shared1/
│ ├─ shared2/
│ └─ ... # packages shared in this repo
└── apps/
├─ frontend/ # A frontend project, may use the shared lib
└─ backend/ # A backend project, may use the shared lib
Now, zeabur can not properly handle the pnpm monorepo correctly.
For installation, the generated dockerfile only copy and install the deps in the root package.json.
For building, I use some monorepo manager to build all the shared library and frontend app (or backend app).
Describe the solution you'd like
Detect the pnpm workspaces, see details in the pnpm docs.
And then generate dockerfile like:
# ...
Copy package.json pnpm-lock.yaml .
Copy packages/shared1/packages.json ./packages/shared1/
Copy packages/shared2/packages.json ./packages/shared2/
RUN pnpm install
# ...
In my previous experience, docker does not support something like glob pattern?
Describe alternatives you've considered
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thank you for your suggestion! We highly value your feedback and think this is a great idea. In fact, this proposal is already on our roadmap. We are working to implement it and hope to make it available to all users in the near future. cc @pan93412