vuepress: Automatic Reload not working?
You can have an automatic reload to be on the development server, for every change I have to reload the page manually
So you can compile the directory directly in
C: \ vuepress-dev
The command vuepress dev already works but when I make some change in the README.md it does not update automatically
- Your OS: Window
- Node.js version: v8.4.0
- VuePress version: v0.7.0
- Browser version: Google Chrome Versión 65.0.3325.181 (Build oficial) (64 bits)
- Is this a global or local install?: Global
- Which package manager did you use for the install?: NPM
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 27 (7 by maintainers)
Commits related to this issue
- fix autoreload see github.com/vuejs/vuepress/issues/221 — committed to ionoid/docs.ionoid.io by ubugnu 4 years ago
I got it working by downgrading dependency
watchpackto 1.6.1 Addedresolutionssection topackage.jsonand ranyarn installHope this helps to anyone struggling with the same problem #2392
Also try
vuepress dev --host localhostI’m experiencing the same. File changes in markdown files can be detected when I change the configuration to the default (cf.
extraWatchFiles).However, automatic (or manual) reloading does work. I have to stop and restart the dev server every time.
I am having this issue. Vuepress does not hot reload when I make changes. I used yarn to install vuepress and also tries vupress dev --host localhost. But it did’nt help
Same problem for me. With the
extraWatchFilesabove plus--host localhost, the server does some building upon changing an.mdfile, but it doesn’t update in the browser. Interestingly, if I change a headline, it will update in the sidebar, but the page remains the same. Reloading the page also doesn’t help and I have to restart thevuepress devprocess. v1.5.0, WindowsLooks like
wepback-servedoesn’t like0.0.0.0on Windows. We might need to default tolocalhoston Windows.This works! For clarity, if you use npm, you must also npm-force-resolutions.
To summarize and clarify, you need to add two things to package.json if you use npm.
and
Followed by
npm install.Result: after updating a *.md file, you don’t need to hit refresh in the browser or restart Vuepress to see the changes.
@ansky-pro so is it an issue with webpack or vuepress its a bug right? @yyx990803 whould this issue be reopened?
What worked, as a workaround, for me is adding additional nodemon script in package.json
First install nodemon globally (npm install -g nodemon). Afterwards you can do: npm run start.
@yyx990803 Ready already worked when running
vuepress dev --host localhostthank you very much and apologize for the inconvenience because running it that way if it works what is the differenceHave you tried
vuepress dev --host localhostas Evan said?I attempted this, but it did not work in my case unfortunately.
If you are on Windows, but you are running VuePress on a Linux Docker container, this problem still exists because process.platform is still ‘linux’.
I think this would be a better solution: https://github.com/webpack-contrib/webpack-serve/issues/56#issuecomment-377912611
Can you open the console and see whether there is some error? such as
WebSocket connection to 'ws://0.0.0.0:8081/' failed?