Fix chokidar on() handler (#3694)

@clarkdo need to merge this asap -- related to https://github.com/nuxt/nuxt.js/pull/3633#discussion_r209436334
This commit is contained in:
Jonas Galvez 2018-08-11 17:43:25 -03:00 committed by Clark Du
parent 3a825dc773
commit ec52104ec1

View File

@ -644,7 +644,7 @@ export default class Builder {
)
this.watchers.restart = chokidar
.watch(nuxtRestartWatch, options)
.on('change', (event, _path) => {
.on('change', (_path) => {
const parsedPath = path.parse(_path)
restartServer(`${parsedPath.base}${parsedPath.ext}`)
})