-
Notifications
You must be signed in to change notification settings - Fork 802
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 is not supported in this environment. #1188
Comments
Hi! I'm having same message after applying https://github.com/gaearon/react-hot-loader#webpack-plugin for my SSR project. |
var evalAllowed = false;
try {
eval('evalAllowed = true');
} catch (e) {
// eval not allowed due to CSP
}
// RHL needs setPrototypeOf to operate Component inheritance, and eval to patch methods
var jsFeaturesPresent = typeof window !== 'undefined' && !!Object.setPrototypeOf;
if (!jsFeaturesPresent || !evalAllowed) {
// we are not in prod mode, but RHL could not be activated
console.warn('React-Hot-Loader is not supported in this environment.');
....
} So, which variable - |
It's showing
|
Same here |
@borisding - so there is no window in SSR, and there is no RHL on SSR side - it relies on I would say - the right way to mitigate the problem - suppress this message on SSR. |
If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.
Description
when run
npm start
,cli will console out:Expected behavior
when run
npm script
,why did this happen?Actual behavior
not waring msg
Environment
React Hot Loader version: 4.7.1
Run these commands in the project folder and fill in their results:
node -v
: 8.10.0npm -v
: 5.6.0The text was updated successfully, but these errors were encountered: