Skip to content

Commit

Permalink
fix(build): fix infinite loop on ng serve (#775)
Browse files Browse the repository at this point in the history
Close #773

In windows, `filePath` seems to not be normalized and has the wrong separations, resulting in incorrect calculation of `destPath`.
  • Loading branch information
filipesilva authored and hansl committed May 15, 2016
1 parent 4779076 commit 285db13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/broccoli/broccoli-handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 285db13

Please sign in to comment.