Skip to content

Commit 7e9d0c1

Browse files
authoredJun 9, 2020
fix (#2392): hmr issue and watch for chokidar v3 (#2436)
* fix: watch for chokidar v3 * chore: remove comments
1 parent 017aa69 commit 7e9d0c1

File tree

1 file changed

+6
-2
lines changed
  • packages/@vuepress/core/lib/node/dev

1 file changed

+6
-2
lines changed
 

‎packages/@vuepress/core/lib/node/dev/index.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,12 @@ module.exports = class DevProcess extends EventEmitter {
207207
publicPath: this.context.base,
208208
watchOptions: {
209209
ignored: [
210-
/node_modules/,
211-
`!${this.context.tempPath}/**`
210+
(x) => {
211+
if (x.includes(this.context.tempPath)) {
212+
return false
213+
}
214+
return /node_modules/.test(x)
215+
}
212216
]
213217
},
214218
historyApiFallback: {

2 commit comments

Comments
 (2)

ulivz commented on Jun 14, 2020

@ulivz
Member

Better commit message should be:

fix($core): HMR issue caused by chokidar v3 (close: #2392) (#2436)

This the generated CHANGELOG will be:

* **$core**: HMR issue caused by chokidar v3 (close: [#2392](https://github.com/vuejs/vuepress/issues/2392)) ([#2436](https://github.com/vuejs/vuepress/issues/2392)) ([7e9d0c1](https://github.com/vuejs/vuepress/commit/7e9d0c1f42196dee52daabfaf796e0cdaa7bd6eb))

Final rendered result:

Compare to current changelog added at f6acb9f#diff-4ac32a78649ca5bdd8e0ba38b7006a1e:


@bencodezen @newsbielt703 @meteorlxy

Please help check whether the commit message meets the specification before merging each MR, Thanks!

A very important principle: fix and feat SHOULD ONLY be used for commit that changes functionality, changelog is very important for users. If necessary, please optimize it manually.

bencodezen commented on Jun 15, 2020

@bencodezen
Member

Thanks for the clarification @ulivz!

Please sign in to comment.