react-refresh-webpack-plugin icon indicating copy to clipboard operation
react-refresh-webpack-plugin copied to clipboard

Empty module import after upgrading from 0.5.15 to >=0.5.16

Open aduth opened this issue 5 months ago • 1 comments

We recently upgraded our project to the latest version of the plugin, and began noticing errors preventing our application from loading.

Specifically, it appears that our application code that imports the express-useragent library results in an empty object, as shown in the screenshot below:

Image

I've confirmed that this issue is only present while this plugin is loaded, works with the plugin at v0.5.15, and stops working with the plugin at v0.5.16, indicating that the issue may have begun as of https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/898 .

I'm not very familiar with what could be happening here, but if this plugin analyzes exports of a module, it may be an incompatibility with how the impacted file defines its exports in a rather unconventional manner.

aduth avatar May 29 '25 18:05 aduth