NPM workspaces support when bundling with @nx/webpack:webpack
#29303
dar-yl
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By default, the
@nx/webpack:webpack
executor treats NPM workspace libs as external dependencies (does not bundle them). This causes a big problem when related packages are private..#10386 provides a summary of the issue / workarounds (note: I attempted the workaround suggested by the OP, however, it did not work). I believe the workarounds are:
workspaces
arrayexternalDependencies
in theNxAppWebpackPlugin
Neither of these workarounds are viable solutions as they create additional problems (I hope these are obvious without an explanation).
I suggest extending
NxAppWebpackPlugin
:bundleInternals
to control the above. Either abool
, or options list, e.g.'all' | 'none' | 'private'
I'm unsure of the behaviour in yarn / pnpm. If I can get some feedback, I'd be more than happy to submit a PR for this.
Beta Was this translation helpful? Give feedback.
All reactions