-
Notifications
You must be signed in to change notification settings - Fork 142
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
how to use sucrase with react-refresh? #590
Comments
HI @zcaudate! Unfortunately, react-refresh isn't supported at the moment with Sucrase, and I don't think there have been any attempts yet to implement it. Like with the I've looked at the |
@alangpierce: thanks for responding - and for sucrase. It's such a refreshing change. I would do it but I just don't have the knowledge right now. I believe react-refresh has it's own diff walking mechanism and it just needs to receive the right inputs from hrm to activate the hook. But I'm missing a lot of context:
Because sucrase is so fast, i'm settling on I did take a look at some gists that was posted for issue that was mentioned on the facebook ticket, the best one being here, I think the babel plugin is doing a lot of babel related stuff and all that is needed is to add this hook to sucrase). I also had a look at sucrase-hot-reloader that @rickhanlonii linked to and it seems that there shouldn't be that much to change but as I've said before, I'm missing a lot of context. |
Switched from sucrase to babel because it seems that's necessary: alangpierce/sucrase#590 I also added nollup, because I'm not entirely sure if rollup actually supports fast refresh natively. Can be invoked with `npm run nollup`. Doesn't work yet though - building with Babel does, but as soon as the refresh plugin is being used, it doesn't, neither with nollup nor rollup.
Switched from sucrase to babel because it seems that's necessary: alangpierce/sucrase#590 I also added nollup, because I'm not entirely sure if rollup actually supports fast refresh natively. Can be invoked with `npm run nollup`. Doesn't work yet though - building with Babel does, but as soon as the refresh plugin is being used, it doesn't, neither with nollup nor rollup.
I'm looking to get react-refresh working with sucrase but I think only babel is supported at the moment:
https://github.com/facebook/react/blob/master/packages/react-refresh/src/ReactFreshBabelPlugin.js
I'm wondering if there have been any attempts to integrate sucrase with the library?
The text was updated successfully, but these errors were encountered: