From d93f4a0f09a08a3e1e9570eec3416859582d3e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 2 Mar 2021 15:37:29 +0100 Subject: [PATCH] fix: handle absolute path --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index ce9774e..a20f50c 100644 --- a/src/index.js +++ b/src/index.js @@ -337,13 +337,13 @@ function rebootTemplateWatcher(context) { ignoreInitial: true, }) - context.watcher.on('add', (path) => { - context.changedFiles.add('./' + path) + context.watcher.on('add', (file) => { + context.changedFiles.add(path.resolve('.', file)) touch(context.touchFile.name) }) - context.watcher.on('change', (path) => { - context.changedFiles.add('./' + path) + context.watcher.on('change', (file) => { + context.changedFiles.add(path.resolve('.', file)) touch(context.touchFile.name) }) })