You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installed via NPM and compiled and deployed as part of a larger application, this package includes references to Hot Module Replacement, throwing the follow error in a production environment:
Uncaught Error: locals[0] does not appear to be a module object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using env section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr
While it appears that the .babelrc file correctly configures this transform to be executed only in development, it's still somehow slipping through – likely within build scripts execute during publication to NPM.
To further test the issue, you can install v0.14.0 within any React project and execute grep hmr -rl node_modules/ – this package will be the only one that includes references to HMR.
I'm going to continue to debug on my end and will submit a PR if I find a solution. In the meantime, I wanted to raise awareness of the issue in case anyone can track it down more quickly.
The text was updated successfully, but these errors were encountered:
When installed via NPM and compiled and deployed as part of a larger application, this package includes references to Hot Module Replacement, throwing the follow error in a production environment:
While it appears that the .babelrc file correctly configures this transform to be executed only in development, it's still somehow slipping through – likely within build scripts execute during publication to NPM.
To further test the issue, you can install v0.14.0 within any React project and execute
grep hmr -rl node_modules/
– this package will be the only one that includes references to HMR.I'm going to continue to debug on my end and will submit a PR if I find a solution. In the meantime, I wanted to raise awareness of the issue in case anyone can track it down more quickly.
The text was updated successfully, but these errors were encountered: