-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
preact-ts preset with react specific libraries #7662
Comments
The error is coming from |
Maybe this is a good issue to report in https://github.com/preactjs/preset-vite? |
Note to workaround this, you can install both |
Yes, it works thanks. I mentioned this issue in https://github.com/preactjs/preset-vite |
(Double posting it for users who found this issue later.) |
Describe the bug
I am using vite with
preact-ts
preset. Tried to install a react-specific library (chakra-ui). In development everything is okay, I can see chakra-ui components on the page, but when I am trying to build the project it fails with a lot of errors related to react import statement.I tried to add aliases into
vite.config.ts
file as described in #1466, but it didn't helpIs there any workaround for this situation?
Reproduction
https://github.com/Geebrox/vite-preact-chakra
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: