Closed csandman closed 11 months ago
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 836f4de26262e3d98b6d8dee526c5c9886e07bc2:
Sandbox | Source |
---|---|
chakra-react-select demo | Configuration |
chakra-react-select TS demo | Configuration |
chakra-react-select + next.js | Configuration |
chakra-react-select + next.js + typescript | Configuration |
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