Open Steve3029 opened 6 years ago
Does your webpack log output Live reload listening on port 3001
?
No, I haven't got any log showing live reload listening on port 3001.
If there's no logging, then the plugin server isn't starting. Are you running webpack in watch mode?
What version of webpack are you using? What version of webpack-livereload-plugin? Can you share an entire webpack config that reproduces this issue?
@statianzo I used webpack-livereload-plugin v2.1.1 and webpack 4. And the issue has been fixed when I went back to webpack v3.11.0 and webpack-livereload-plugin v1.0.0.
Thanks for the report @Steve3029. I'm reopening this as a reminder to look at v2.1.1 with webpack 4.
Any progress on this?
Currently with version 2.1.1 and webpack 4.19.1 it works for me.
Yeah, it seems to have arbitrarily started working again with the latest webpack. Classic Javascript.
Same error using webpack 4.29.1 and plugin version 2.2.0
Dumb mistake on my part was running webpack on docker without opening the port for the webpack-livereload-plugin server.
Forwarding that port fixed the ERR_CONNECTION_REFUSED
Took me many days to make webpack-dev-server work in WordPress coz it needs the HTML file, but I can't. Finally this plugin works!
For some reason, you need to refresh the browser 1st, just one refresh then the live reload will kick in the next time you change the file.
"webpack-livereload-plugin": "^3.0.1",
"webpack": "^5.33.2",
"webpack-cli": "^4.6.0",
new LiveReloadPlugin({ protocol: "http", hostname : "understraptest.local", appendScriptTag: true, })
My webpack config:
plugins: [ new LiveReloadPlugin({port: 3001}) ]
In html page:
<script src="http://localhost:3001/livereload.js"></script>
I have got the following error on Chrome: "GET http://localhost:3001/livereload.js net::ERR_CONNECTION_REFUSED"