-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(node): Ensure modulesIntegration
works in more environments
#16566
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
Conversation
b9ac82d
to
7f29495
Compare
size-limit report 📦
|
...packageJson.dependencies, | ||
...packageJson.devDependencies, |
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.
l/maybe something to follow up on in the future: Would be cool to add some kind of flag to differ between dependencies
and devDependencies
. Doesn't have to happen now of course
96b9078
to
988111d
Compare
988111d
to
cec19a7
Compare
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.
There's probably a bunch of edge cases here with monorepos and mixed esm/cjs environments that we don't account for, but I think this is a good starting point.
Extracted out from #16565
I noticed that our
modulesIntegration
is pretty limited:This PR makes this a bit more robust (not perfect):
process.cwd() + 'package.json'
and take the dependencies and devDependencies from there. this should generally work in esm apps now as well, at least at a basic level. You do not get all dependencies and versions may be ranges, but better than nothing.