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
feat(react): automatically detect npm dependencies as external when building library #6560
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/3CUhgBjm3MYXuq8EJgbWdcPM9M1N [Deployment for 4d6c09c canceled] |
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.
LGTM
Nx Cloud ReportCI ran the following commands for commit 4d6c09c. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch Sent with 💌 from NxCloud. |
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.
This looks awesome. Thanks so much. Will this work with pnpm? When I tried your gist, my id
value was the full system path
45c9fca
to
4d6c09c
Compare
Yes there isn't any different between how we handle npm, yarn, pnpm from a dependency detection perspective. |
Then I am not sure what I am doing wrong but I am getting errors
project.json (example. got multiple ones failing)
rollup.config.js that I used to have which worked. Now that I delete it, it fails.
Notice how I had |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This MR allows React/Web/Next libraries to be built without manually adding entries to
external
option.Current Behavior
If you used say 'lodash' you need to use option
"external": ["lodash"]
in project configuration.Expected Behavior
Npm packages should not need manual
external
entry. Nx already knows this information and can provide it automatically.