-
-
Notifications
You must be signed in to change notification settings - Fork 934
Description
Descrcibe the bug?
When using React-Play with Vite-Js, some plays won't work because Vite doesn't let file with mixed react content with javascript if the file doesn't have the jsx extension or the tsx extension.
The extension jsx/tsx won't have a problem with Cra.
So, it's save to move all plays to jsx/tsx extension.
For the future, it will be good that create-react-play create the play with jsx/tsx extension to not have this problem again.
Steps to reproduce the bug?
Move from Cra to Vite.
A little discussion about it here :
https://twitter.com/youyuxi/status/1362050255009816577
Expected behavior
Just change the extension for the js file that uses react inside.
For other files with the js extension but without react code inside, let them with the js extension.
Nevertheless, the random-quote-card-generator play needs a little rewrite as a default export is not named correctly
and won't be accepted by vite with a bad import.
It doesn't impact the play and the personal code of the creator.
Desktop (Please provide your system information)
Not relevant.
Mobile (Please provide your device information)
No response
Screenshot / Screenshare
Relevant log output
NoCode of Conduct
- I agree to follow this project's Code of Conduct
