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

fix: support vite v3 #50

Merged
merged 1 commit into from Jun 27, 2022
Merged

fix: support vite v3 #50

merged 1 commit into from Jun 27, 2022

Conversation

sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Jun 22, 2022

preact provides exports field and module field so it worked without interop codes.
This PR removes them because it was causing issues with Vite v3.

fixes #52

I tested with Vite (3.0.0-beta.1, 2.9.12) and preact (10.8.2, 10.7.0) with reproduction on #49.

@IanVS
Copy link

IanVS commented Jun 22, 2022

I can confirm that this change fixes the issue I was having in the storybook preact example (#49).

@IanVS
Copy link

IanVS commented Jun 27, 2022

Hi @JoviDeCroock, vite 3 is close to being released out of beta soon, do you think you might have a chance to review this PR, to avoid users having problems with preact?

@JoviDeCroock
Copy link
Member

JoviDeCroock commented Jun 27, 2022

Apologies, been really busy lately. Did y'all have a chance to test this already, I can make some time to test it out as well later tonight. We want it to work with both vite 2 and 3 so will test both, there must be a reason why we had thsi code

@JoviDeCroock JoviDeCroock self-requested a review June 27, 2022 16:51
@JoviDeCroock JoviDeCroock mentioned this pull request Jun 27, 2022
1 task
@JoviDeCroock
Copy link
Member

Tested with both vite 2 as well as 3 worked fine!

@JoviDeCroock JoviDeCroock merged commit 0a5a189 into preactjs:main Jun 27, 2022
@IanVS
Copy link

IanVS commented Jun 27, 2022

Thanks!

@JoviDeCroock JoviDeCroock mentioned this pull request Jun 27, 2022
@molily
Copy link

molily commented Jun 27, 2022

Thank you very much for your work!

@sapphi-red sapphi-red deleted the fix-vite-v3 branch June 28, 2022 03:39
Interpause pushed a commit to Interpause/preact-preset-vite that referenced this pull request Aug 7, 2022
Interpause pushed a commit to Interpause/preact-preset-vite that referenced this pull request Aug 7, 2022
JoviDeCroock added a commit that referenced this pull request Oct 13, 2023
* allow jsx import source to be configured

* allow package to be installed via git

* fix: support vite v3 (#50)

* 2.3.0 (#53)

* add named export to improve `"module": "nodenext"` compatibility (#48)

* add named export to improve `"module": "nodenext"` compatibility

* add proper types export

* Update src/index.ts

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>

* Update package.json

* remove "prepare" script

---------

Co-authored-by: 翠 / green <green@sapphi.red>
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
Co-authored-by: Volodymyr Zhdanov <wight554@gmail.com>
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.

Doesn't work with Vite 3
4 participants