-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use package.json#exports
#565
Conversation
🦋 Changeset detectedLatest commit: f2112b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #565 +/- ##
=======================================
Coverage 92.19% 92.19%
=======================================
Files 40 40
Lines 1973 1973
Branches 595 595
=======================================
Hits 1819 1819
Misses 144 144
Partials 10 10
☔ View full report in Codecov by Sentry. |
// tricking static analysis is fun | ||
// @ts-ignore | ||
process["e" + "nv"].NODE_ENV = "production"; | ||
process.env.NODE_ENV = "production"; |
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.
is this even needed now? I'm not sure what this was about
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.
It's because some babel plugins might rely on process.env.NODE_ENV
and Preconstruct is basically always meant for building for "production"
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'm assuming the main reason to do this is to avoid the dev vs prod bundle so it's a bit easier to patch, yeah? it's not like the package.json#exports
field really matters here?
Yeah, exactly. |
No description provided.