Skip to content

Commit

Permalink
fix(dev): Show correct path when webpack watched files changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Dec 9, 2018
1 parent fe05169 commit 25dea5f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/cli/src/commands/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}

0 comments on commit 25dea5f

Please sign in to comment.