-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add a document about pnpm monorepo error #1349
Conversation
09f3fda
to
d4aeb07
Compare
Thanks for working on this. Yeah, I think the text needs to be reworked. It's not really a document about pnpm, although it can mention pnpm as one of the reasons that a package may not really get consumed by broccoli and thus end up empty in embroider. An attempt (I don't think I did a good job yet explaining the pnpm part): Problem: Embroider Produces an Empty Addon PackageEmbroider rewrites traditional (v1) addons to the new v2 format before building your application. It can only tell what contents those packages should have by letting the traditional broccoli-based build pipelines run and observing the files that come out. But there are several reasons an addon won't ever get consumed by broccoli, causing embroider to emit an empty package, whose package.json has a comment linking back to this document. Reasons you might have an empty package include:
|
21c3e7d
to
bac94ec
Compare
I took a second pass at it there now mostly taking your stuff to replace the majority of the content 😂 I also renamed the file to make it more about the empty package output rather than a pnpm bug 👍 |
docs/empty-package-output.md
Outdated
|
||
There are several reasons an addon won't ever get consumed by broccoli, causing embroider to emit an empty package. Some of those reasons include: | ||
|
||
- if an app uses `addons.blacklist`, the excluded addon can end up empty since nobody consumed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- if an app uses `addons.blacklist`, the excluded addon can end up empty since nobody consumed it | |
- if an app uses `addons.blacklist` or `addons.exclude`, the excluded addon can end up empty since nobody consumed it |
Though, addons.blacklist
will be removed in ember-cli
v5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've included this change 👍
docs/empty-package-output.md
Outdated
There are several reasons an addon won't ever get consumed by broccoli, causing embroider to emit an empty package. Some of those reasons include: | ||
|
||
- if an app uses `addons.blacklist`, the excluded addon can end up empty since nobody consumed it | ||
- if an addon uses the shouldIncludeChildren() hook to exclude a child addon, the child addon can end up empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- if an addon uses the shouldIncludeChildren() hook to exclude a child addon, the child addon can end up empty | |
- if an addon uses the `shouldIncludeChildAddon()` hook to exclude a child addon, the child addon can end up empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've included this change 👍
For visibility, it seems this is getting fixed here: pnpm/pnpm#6153 (opt-in for v7, probably by default in v8) |
Thanks, merging this so we can move forward with a link to this doc, and then we can iterate on it further. |
I desperately need some help explaining this better. I only have a rough understanding of what the underlying mechanism is so I am not feeling confident explaining it