-
Notifications
You must be signed in to change notification settings - Fork 799
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
react-hot-loader breaks the page without react #1159
Comments
Why you need React-Hot-Loader then? |
Some of pages used react, and some simple page didn't. and they are in one project. |
Ok. Got the point. Probably that’s easy to fix. |
So, what should i do to fix this problem? |
You can’t do it. It should be fixed inside RHL. |
Ok. It's not possible to fix this issue from React-Hot-Loader side. How to fix it:
window.React = null;
|
The change was not released yet |
Description
My project has a lot of pages, some of which don't use react, react-hot-loader breaks these pages.
Expected behavior
no react-hot-loader code in the js of the page.
Actual behavior
i add react in webpack externals, but do not add cdn link in this page. and react-hot-loader requires it, so "React is not defined", but i really don't need react. If i remove react-hot-loader/babel in .babelrc or remove react in externals or add cdn link in this page, everything will be ok.
Environment
React Hot Loader version: 4.2.0
Run these commands in the project folder and fill in their results:
node -v
: 8.11.3npm -v
: 6.4.0Reproducible Demo
.babelrc
webpack externals
The text was updated successfully, but these errors were encountered: