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

Remove Deprecated injectBabelPlugin #16

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

Olafaloofian
Copy link
Contributor

The new version of react-app-rewired (>2.0) removed all the methods like injectBabelPlugin. This causes react-app-rewire-hot-loader to error out when trying to require and use it from react-app-rewired.

I made a quick fix to get the package working again, and as far as I can tell no functionality was lost. I'm not entirely sure what's going on behind the scenes of react-app-rewired and react-hot-loader, but they must be handling the necessary babel plugin in a different fashion now.

@cdharris
Copy link
Owner

cdharris commented Feb 6, 2019

Thanks @Olafaloofian! I haven't been working with this package recently so I'll also have to cross my fingers while I merge your PR into a version 2.0.0 :) - Cheers!

@cdharris cdharris merged commit fe772cf into cdharris:master Feb 6, 2019
@esetnik
Copy link

esetnik commented Feb 8, 2019

This just disables the functionality of reat-hot-loader. You're no longer injecting the babel plugin that makes it work.

@Olafaloofian
Copy link
Contributor Author

Olafaloofian commented Feb 8, 2019

Hmmm, I didn't notice any difference in the react-hot-loader functionality with this change. But maybe it was just not working all along and I'm comparing broken to broken. This was a quick fix mostly to get my apps to compile. I'll look more deeply into how to enable the plug-in with the new react-hot-loader changes.

@esetnik
Copy link

esetnik commented Feb 8, 2019

I believe you’d need to use customize-cra and inject babel plugin for react-hot-loader. And also alias react-dom to the new hot-loader/react-dom.

@Olafaloofian
Copy link
Contributor Author

Thanks! I'm working on that today for sure. I think your suggestions are on the right track - I appreciate it. 😊

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.

3 participants