Skip to content

Version 4.8.4 seems to break the new way of importing into app.js? #1240

Description

@Svendelmaus

Description

Basically, 4.8.4 seems to force us to use the old syntax in our app.js in our setup.

As a background, we've been updating a bunch of modules in our existing apps, including react-hot-loader. In our package.json file, we've updated it to say:

"react-hot-loader: "^4.8.3",

And, following the documentation, we've updated our app.js to say:

import { hot } from 'react-hot-loader/root';
...
export default hot(App);

This was all working fine until recently.

Today, I was taking over work someone else had done, and ended up doing a fresh install of the modules; npm install pulled in 4.8.4 instead of 4.8.3, and the app stopped working.

Expected behavior

No change from 4.8.3.

Actual behavior

In the console, there is an error that says "react-hot-loader/root is not supported on your system". The app does not run.

Changing the app.js file back to:

import { hot } from 'react-hot-loader';
...
export default hot(module)(App);

allows the app to run again.

Once I worked out what appeared to be causing the problem, I updated our package.json to lock the version to 4.8.3; this allowed me to change the app.js back to the react-hot-loader/root way of doing things.

I'd prefer not to have to lock the version if we don't have to, however.

Environment

React Hot Loader version: 4.8.4

node -v: v10.14.2
npm -v: 6.9.0

Operating system: Ubuntu 16
Browser and version: Chrome 73

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions