-
Notifications
You must be signed in to change notification settings - Fork 212
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
Hot Reload not working #124
Comments
Have you solved it so far |
Not yet, but I stop to use VuePress which is better. |
Came across this on my linux machine, and issue seems to be the glob patterns not matching when using the ReproducingWherever you have your global gitbook install, look for the var toWatch = [
'book.json', 'book.js', '_layouts/**',
"content/README.md",
]; Although the SolutionOne way of automating this is procedurally generating a full list of files to watch - in my case all the relevant files existed in the const fs = require('fs'); // ADDED
<-snip->
function watch(dir) {
var d = Promise.defer();
dir = path.resolve(dir);
watchFolder = './content'; // ADDED
var toWatch = [
'book.json', 'book.js', '_layouts/**',
...fs.readdirSync(watchFolder).map(file => `${watchFolder}/${file}`) // ADDED
];
<-snip-> will have your releveant files being watched. Of couse this is a very direct change and can probably be implemented more elegantly via plugins, but this would be the starting point. |
My environment information as following:
OS: Ventura 13.2.1
Gitbook version: 3.2.3
CLI version: 2.3.2
npm version: 6.14.12
node version: 10.24.1
I encounter the problems below
when I run gitbook serve , which is running well
but when I edit the files, which should show the following message
but it didn't. Nothing happened.
I need to ctrl+c to close the serve and restart the gitbook server manually.
But my colleague's (MBP BigSur 11.6.8 ) running well.
Please don't tell the difference of the intel and mac chips make this reason........
The text was updated successfully, but these errors were encountered: