From 9b3a404e325e8f5465c8b30f50beddbaf702cf5a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 15 May 2016 02:13:55 +0100 Subject: [PATCH] fix(build): fix infinite loop on ng serve Close #773 In windows, `filePath` seems to not be normalized and has the wrong separations, resulting in incorrect calculation of `destPath`. --- lib/broccoli/broccoli-handlebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/broccoli/broccoli-handlebars.js b/lib/broccoli/broccoli-handlebars.js index 5d4b86c42c81..269cfed8160c 100644 --- a/lib/broccoli/broccoli-handlebars.js +++ b/lib/broccoli/broccoli-handlebars.js @@ -22,6 +22,7 @@ class HandlebarReplace extends BroccoliCacheWriter { build() { this.listFiles().forEach((filePath) => { + filePath = path.normalize(filePath); const destPath = filePath.replace(this.inputPaths[0], this.outputPath); const content = fs.readFileSync(filePath, 'utf-8'); const template = Handlebars.compile(content);