mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(dev): Show correct path when webpack watched files changed
This commit is contained in:
parent
fe0516978a
commit
25dea5f52a
@ -54,25 +54,23 @@ export default {
|
|||||||
|
|
||||||
logChanged({ event, path }) {
|
logChanged({ event, path }) {
|
||||||
const { icon, color, action } = eventsMapping[event] || eventsMapping.change
|
const { icon, color, action } = eventsMapping[event] || eventsMapping.change
|
||||||
|
|
||||||
consola.log({
|
consola.log({
|
||||||
type: event,
|
type: event,
|
||||||
icon: chalk[color].bold(icon),
|
icon: chalk[color].bold(icon),
|
||||||
message: `${action} ${chalk.cyan(path)}`
|
message: `${action} ${chalk.cyan(formatPath(path))}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async onWatchRestart({ event, path }, { nuxt, cmd, argv }) {
|
async onWatchRestart({ event, path }, { nuxt, cmd, argv }) {
|
||||||
this.logChanged({
|
this.logChanged({ event, path })
|
||||||
event,
|
|
||||||
path: formatPath(path)
|
|
||||||
})
|
|
||||||
|
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
|
|
||||||
await this.startDev(cmd, argv)
|
await this.startDev(cmd, argv)
|
||||||
},
|
},
|
||||||
|
|
||||||
onBundlerChange(changedFileName) {
|
onBundlerChange(path) {
|
||||||
this.logChanged(changedFileName)
|
this.logChanged({ event: 'change', path })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user