Closed emmatown closed 1 year ago
Latest commit: 603bd7a3a48528d3e5f5679d5dc5f590c9db8602
The changes in this PR will be included in the next version bump.
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
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 603bd7a3a48528d3e5f5679d5dc5f590c9db8602:
Sandbox | Source |
---|---|
react-codesandboxer-example | Configuration |
closes #5595 closes #4859
The
exports
field added in #5559 was wrong in a few ways, arethetypeswrong explains this well:This PR makes react-select use Preconstruct's exports field feature which does things correctly, I've also checked the build output on this branch with arethetypeswrong and it reports no errors. Of note is that there is still no bundle for Node ESM, the
.mjs
file used when theimport
condition matches just re-exports from the CJS bundle but fixes the default export (this is new to Preconstruct and is what"importConditionDefaultExport": "default"
is doing), the lack of a Node ESM bundle is intentional so the dual package hazard can't happen. Bundlers will use themodule
condition to still have ESM there. There is also intentionally notypes
condition, that's unnecessary because Typescript will resolve to theimport
ordefault
conditions and use the.d.mts
and.d.ts
files next to the implementations.