From 25dea5f52a30628c43213fdc6d620c0d0eda8d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 9 Dec 2018 12:47:57 +0100 Subject: [PATCH] fix(dev): Show correct path when webpack watched files changed --- packages/cli/src/commands/dev.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/commands/dev.js b/packages/cli/src/commands/dev.js index 7d6f6f5f86..e598338782 100644 --- a/packages/cli/src/commands/dev.js +++ b/packages/cli/src/commands/dev.js @@ -54,25 +54,23 @@ export default { logChanged({ event, path }) { const { icon, color, action } = eventsMapping[event] || eventsMapping.change + consola.log({ type: event, icon: chalk[color].bold(icon), - message: `${action} ${chalk.cyan(path)}` + message: `${action} ${chalk.cyan(formatPath(path))}` }) }, async onWatchRestart({ event, path }, { nuxt, cmd, argv }) { - this.logChanged({ - event, - path: formatPath(path) - }) + this.logChanged({ event, path }) await nuxt.close() await this.startDev(cmd, argv) }, - onBundlerChange(changedFileName) { - this.logChanged(changedFileName) + onBundlerChange(path) { + this.logChanged({ event: 'change', path }) } }