Skip to content

Commit

Permalink
fix (#2392): hmr issue and watch for chokidar v3 (#2436)
Browse files Browse the repository at this point in the history
* fix: watch for chokidar v3

* chore: remove comments
  • Loading branch information
pikax committed Jun 9, 2020
1 parent 017aa69 commit 7e9d0c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@vuepress/core/lib/node/dev/index.js
Expand Up @@ -207,8 +207,12 @@ module.exports = class DevProcess extends EventEmitter {
publicPath: this.context.base,
watchOptions: {
ignored: [
/node_modules/,
`!${this.context.tempPath}/**`
(x) => {
if (x.includes(this.context.tempPath)) {
return false
}
return /node_modules/.test(x)
}
]
},
historyApiFallback: {
Expand Down

2 comments on commit 7e9d0c1

@ulivz
Copy link
Member

@ulivz ulivz commented on 7e9d0c1 Jun 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification @ulivz!

Please sign in to comment.