Skip to content
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

Switch to tsup #294

Merged
merged 3 commits into from Oct 20, 2023
Merged

Switch to tsup #294

merged 3 commits into from Oct 20, 2023

Conversation

csandman
Copy link
Owner

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 the exports field in the package.json to work properly. It also appears to solve the problem mentioned in #260, where the id prop coming from Chakra's useFormControl 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.ts

Here are the results from arethetypeswrong:

Before

https://arethetypeswrong.github.io/?p=chakra-react-select%404.7.5

image

After

image

@codesandbox-ci
Copy link

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 836f4de:

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

@csandman csandman merged commit 5745d75 into feat/theming Oct 20, 2023
2 checks passed
@csandman csandman deleted the feat/tsup branch October 23, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant