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

Clarification: do I need another, additional plugin to reload the plain JS files in my React project ?

Open Gaibhne opened this issue 2 years ago • 1 comments

I have a React project, so this plugin seems appropriate, but I am unclear about whether I can use it to hot reload the plain .js files that my React components reference and use or whether I need to realize that through an entirely different plugin altogether. Currently, all changes to my plain JS files references by React components trigger a full reload (or a complaint, if I set hot: 'only'), but I am unsure whether this is due to misconfiguration on my part or due to this functionality not being covered by this plugin.

Gaibhne avatar May 31 '23 09:05 Gaibhne

It is likely misconfiguration/intentional due to indeterministic behaviour. As long as the plain JS files are within the import cycle of the app they will be reloaded.

pmmmwh avatar Aug 09 '23 14:08 pmmmwh