Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit 5d05679

Browse files
authored
Merge pull request #4 from tailwindlabs/fix/handle-absolute-path
fix: handle absolute path
2 parents 09e7830 + d93f4a0 commit 5d05679

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ function rebootTemplateWatcher(context) {
337337
ignoreInitial: true,
338338
})
339339

340-
context.watcher.on('add', (path) => {
341-
context.changedFiles.add('./' + path)
340+
context.watcher.on('add', (file) => {
341+
context.changedFiles.add(path.resolve('.', file))
342342
touch(context.touchFile.name)
343343
})
344344

345-
context.watcher.on('change', (path) => {
346-
context.changedFiles.add('./' + path)
345+
context.watcher.on('change', (file) => {
346+
context.changedFiles.add(path.resolve('.', file))
347347
touch(context.touchFile.name)
348348
})
349349
})

0 commit comments

Comments
 (0)