-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
HMR (Hot module reload) not working #6004
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
Comments
update: Please provide reproducible repo. I create a new project by @vue/[email protected] which depends on @vue/[email protected] but can't reproduce your problem. Did this problem appear after you upgraded any dependencies? |
I just tried devDependency |
The problem appears to have been introduced starting in Please note that I am using a remote server with:
I have not tested this with a server on localhost. |
@sdwru How is your host ( |
No mapping no proxy. No entry in hosts file. It's just a generic virtual Linux server with default settings. No firewall no selinux. I access the server at It works on This is my hosts file with the public ip obfuscated.
|
There are some problems when using host |
Hmm, for me it fails to auto-detect the IP for the network URL on my remote server so it can't connect, but if I specify the host in @sdwru Mind moving your host from the Edit: it does correctly detect my Server's IP, it just discards it because it's not a private one |
If you set host to @vue/cli-service 4.1.2webpack entries in development is [
/path_to/node_modules/webpack-dev-server/client/index.js?http://`your_priviate_ip:port`/sockjs-node',
/path_to/node_modules/webpack/hot/dev-server.js',
'./src/main.js'
] Besides, webpack-dev-server will inject entry dynamically, injected entry is Since you are using remote development server. Browser can't establish websocket connection through However, the dynamic injected entry works. @vue/cli-service 4.2.0since So solutionI believe if user set Moreover, the So workaround is devServer: {
host: '0.0.0.0',
public: `your_domain:port`
} |
Thanks @jonaskuske @fangbinwei Adding
to |
Version
4.5.8
The problem appears to have been introduced starting in
@vue/[email protected]
. HMR still works in@vue/[email protected]
Environment info
Steps to reproduce
vue-cli-service serve
What is expected?
Changes to a File.vue file should be reflected in the browser without a reload
What is actually happening?
Changes are not shown until browser is reloaded
Downgrading to
@vue/cli-service v4.1.2
resolves the problemThis is my vue.confg.js
The text was updated successfully, but these errors were encountered: