-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support bundleDependencies with nx release
#21789
Comments
In case it's helpful, here's my release script which now should handle this properly: https://github.com/epicweb-dev/kcdshop/blob/42a29726911ecfc3b538079635042e5e87bfc86d/other/release.ts I'm sure I'm missing things, but maybe this will work ok? One downside is it makes my releases take much longer. So it would be cool if I were more surgical about which packages get copied, but that would require tracing dependencies so that would be tricky. I do think that I can improve this by only copying things over if the package has bundleDependencies configured... |
I'll need to think more about this one but my instinctive reaction is that npm should support this within npm workspaces, rather than it being an Nx specific concern. There is a long standing issue open about it: npm/cli#3466 Therefore, at least initially, having it be something that is part of a release script does seem to make sense to me (and note, this is particularly necessary for the use-case of publishing from "dist" (in your case the With that said, perhaps we could do more by providing the copying utility from the programmatic API so that folks could trivially wire it up instead of having to reinvent what you have done here. I'll keep you posted! |
Thanks! |
This issue has been automatically marked as stale because it hasn't had any activity for 6 months. |
I'd still love this |
Description
I would like
nx release
to supportbundleDependencies
.Because in npm workspaces, some of the
node_modules
are hoisted to the top directory, when running the publish script those aren't in the directory where you're publishing so they won't be bundled.Motivation
Without this feature then it violates the principle of least surprise because
bundleDependencies
is a feature ofnpm publish
and it seems like this would be a missing feature.Suggested Implementation
Make it easy to copy all the appropriate
node_modules
into the proper directory before publishingAlternate Implementations
I'm going to script this myself (wish me luck), but having something built-in would be nice!
The text was updated successfully, but these errors were encountered: