Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multiple bundles on same page breaks reload #69

Open
pmwmedia opened this issue Jun 5, 2021 · 0 comments
Open

Multiple bundles on same page breaks reload #69

pmwmedia opened this issue Jun 5, 2021 · 0 comments

Comments

@pmwmedia
Copy link

pmwmedia commented Jun 5, 2021

I have a page with three bundles. Unfortunately, reloading does not work with new LiveReloadPlugin({port: 0, appendScriptTag: true}).

On startup, everything looks fine:

  1. Webpack starts with three different reloading ports:
$ ../node_modules/.bin/webpack --mode=development --watch
[webpack-cli] Compilation antd-reduced starting...
[webpack-cli] Compilation logdb-web starting...
[webpack-cli] Compilation starting...
<i> [LiveReloadPlugin] Live Reload listening on port 35729
<i> [LiveReloadPlugin] Live Reload listening on port 35730
<i> [LiveReloadPlugin] Live Reload listening on port 35731
[webpack-cli] Compilation finished
[webpack-cli] watching files for updates...
[webpack-cli] Compilation finished
[webpack-cli] watching files for updates...
[webpack-cli] Compilation finished
  1. The HTML page has three reload scripts included:
<script id="webpack-livereload-plugin-script-2b46959be903b68a" async="" src="//localhost:35729/livereload.js"></script>
<script id="webpack-livereload-plugin-script-40d0cd75cb7a994d" async="" src="//localhost:35730/livereload.js"></script>
<script id="webpack-livereload-plugin-script-15a04157ba643cb0" async="" src="//localhost:35731/livereload.js"></script>
  1. And the browser prints the success message even three times into the console:
[Live Reload] enabled
[Live Reload] enabled
[Live Reload] enabled

However, I have noticed in the network monitor that the URLs are incorrectly mapped:

http://localhost:35729/livereload.js -> ws://localhost:35729/livereload
http://localhost:35730/livereload.js -> ws://localhost:35729/livereload
http://localhost:35731/livereload.js -> ws://localhost:35729/livereload

All three HTTP-URLs are mapped to the same WS-URL!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant