Skip to content

Commit 285db13

Browse files
filipesilvahansl
authored andcommitted
fix(build): fix infinite loop on ng serve (#775)
Close #773 In windows, `filePath` seems to not be normalized and has the wrong separations, resulting in incorrect calculation of `destPath`.
1 parent 4779076 commit 285db13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/broccoli/broccoli-handlebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class HandlebarReplace extends BroccoliCacheWriter {
2222

2323
build() {
2424
this.listFiles().forEach((filePath) => {
25+
filePath = path.normalize(filePath);
2526
const destPath = filePath.replace(this.inputPaths[0], this.outputPath);
2627
const content = fs.readFileSync(filePath, 'utf-8');
2728
const template = Handlebars.compile(content);

0 commit comments

Comments
 (0)