From 820f1e9f8c84f4ee8f4799b7d87e91d468b4a363 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Fri, 23 Aug 2019 10:57:49 +0800 Subject: [PATCH] fix data error --- doric-cli/scripts/watcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doric-cli/scripts/watcher.js b/doric-cli/scripts/watcher.js index 7313a939..17d7f284 100644 --- a/doric-cli/scripts/watcher.js +++ b/doric-cli/scripts/watcher.js @@ -19,7 +19,7 @@ setTimeout(() => { const sourceMap = doMerge(path + ".map") ws.connections.forEach(e => { e.sendText(JSON.stringify({ - script: fs.readFileSync(path), + script: data, source: path.match(/[^/\\]*$/)[0], sourceMap, }))