react-refresh-webpack-plugin
                                
                                
                                
                                    react-refresh-webpack-plugin copied to clipboard
                            
                            
                            
                        Client is trying to connect to wrong port
I have project running on https://mediadl.test and webpack dev server running on port 8080 (I don't specify port, it's automatically selected). The project is serving HTML template which contains script links to dev server <script src="https://mediadl.test:8080/js/app.js"></script>.
I start webpack with this command line:
$ webpack --host mediadl.test --client-web-socket-url-hostname=mediadl.test --server-type https --server-options-key=/path/to/mediadl.test.key --server-options-cert=/path/to/mediadl.test.crt --server-options-ca=/path/to/default.pem
The problem is that this plugin tries to connect to wss://mediadl.test/ws which is wrong. Dev server client itself connects to right endpoint: wss://mediadl.test:8080/ws.
Previously port was detected from document.currentScript which gives right host and port pair, now it uses data passed from resourceQuery (why?).