Skip to content
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

Usage with devServer.inline = false #647

Open
BenjaminWFox-MuleSoft opened this issue Jun 10, 2022 · 1 comment · May be fixed by #851
Open

Usage with devServer.inline = false #647

BenjaminWFox-MuleSoft opened this issue Jun 10, 2022 · 1 comment · May be fixed by #851

Comments

@BenjaminWFox-MuleSoft
Copy link

I have a working implementation with ReactRefreshPlugin/HMR for our common-use development build scenario.

Another build scenario, however, requires setting the option devServer.inline = false to more closely simulate our environment that uses Module Federation, and this setting appears to break the integration with ReactRefreshPlugin, as it gives the error:

<w> [ReactRefreshPlugin] Hot Module Replacement (HMR) is not enabled! React Refresh requires HMR to function properly.

Under the hood, it appears that HMR is still functional - the webpack dev server status bar cycles through App ready. -> App updated. Recompiling... -> App hot update., but then the app itself never refreshes with the changes.

The only difference I see in the startup output is:

  • devServer.inline = true -> ℹ 「wds」: Project is running at https://localhost:8080/
  • devServer.inline = false -> ℹ 「wds」: Project is running at https://localhost:8080/webpack-dev-server/

Do you know if there's an easy/obvious way to get this working? Let me know if I can provide any additional information.

@pmmmwh
Copy link
Owner

pmmmwh commented Jun 13, 2022

I believe this does not impact the functionality - it is just a warning. It's definitely false positive here, because we try to detect if the HMR plugin is injected on the Webpack compiler, and when inline mode is used it is not injected for the current compiler. I'm not sure HMR would actually work with auto-refresh in that mode automatically, perhaps you need to use polling?

As for the warning, it's definitely something we can try to fix, but given that this mode have been completely removed from WDS v4 I rank this quite low on the list.

@pmmmwh pmmmwh linked a pull request Jun 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants