Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switch to using
tsup
for bundling the dist files. This has the main benefit of bundling the ESM version of the files using the real.mjs
file extension, which allows for theexports
field in thepackage.json
to work properly. It also appears to solve the problem mentioned in #260, where theid
prop coming from Chakra'suseFormControl
hook were not defined on the server. I'm not exactly sure why this fixes it, but I'll take it.This change was initially motivated by the fact that Chakra UI also switched to using
tsup
for their bundling: https://github.com/chakra-ui/chakra-ui/blob/754d9d4/packages/components/tsup.config.tsHere are the results from arethetypeswrong:
Before
https://arethetypeswrong.github.io/?p=chakra-react-select%404.7.5
After