multi-file pnpm-workspace.yaml #9090
Replies: 3 comments 1 reply
-
Right, but the directories that contain apps written in a different language won't have a package.json file, no? So pnpm will ignore those directories automatically. |
Beta Was this translation helpful? Give feedback.
-
That's great news! It looks like this will accomplish the same thing with 1/10000th of the effor packages:
# Include all directories in the workspace
- '*'
# Include all subdirectories at any depth
- '**/*'
# Exclude node_modules folders anywhere in the tree
- '!**/node_modules/**'
# Exclude node_modules folder in root
- '!node_modules'
# Exclude anything inside bazel dirs
- '!bazel-*/**' |
Beta Was this translation helpful? Give feedback.
-
Added to rules_js documentation |
Beta Was this translation helpful? Give feedback.
-
problem
There are currently two options for adding projects to pnpm-workspace.yaml
(1) adding the direct path to every project
(2) adding projects in the same folder using wildcard
In a large monorepo with many different languages, neither approach works well.
The first approach doesn't work well because the pnpm-workspace.yaml file gets huge as projects are added.
The second approach doesn't work well because it forces a certain directory structure which doesn't work for those who organize by application rather than language/ecosystem.
For example, there's not a great way to handle this scenario
The use case is specifically for
aspect-build/rules_js
with bazel.Suggestion
Add a way to configure pnpm-workspace.yaml to use multiple files.
The syntax of pnpm-workspace.yaml could look like
Which would instruct pnpm how to scan for additional
.pnpm-workspace
files in any subfolder of the project root up to a specified depth.Beta Was this translation helpful? Give feedback.
All reactions