Collect all modules for workspace package #518
Unanswered
ianwremmel
asked this question in
RRFC
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to be able to copy all dependencies for a workspace package to a single location.
I've got a monorepo with several packages that define AWS Lambda functions. Right now, I'm using rollup to bundle most each of those functions' dependencies into a single index.js file and I have a manually maintained Lambda Layer that contains the handful of dependencies that don't bundle well.
Ideally, I'd instead be able to collect all of the dependencies for each function and zip it into its own Lambda Layer, but there doesn't seem to be any way to do that since most dependencies are installed to
./node_modules
while few if any are installed to./workspace/function-a/node_modules
.Relatedly, but subtly different, I'd like to be able to generate a package-lock.json that's a subset of the root package-lock.json that only contains entries for a single workspace package's dependencies. I've got a monorepo that publishes subfolders to other github repos. Ideally, I could include lockfiles in those other repos, but again, because the workspaces share lots of dependencies, I have no good way to get the relevant subset.
Beta Was this translation helpful? Give feedback.
All reactions