Skip to content

Commit

Permalink
fix babel-run on windows (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
datvong-wm authored and jchip committed Jan 24, 2018
1 parent 7c133be commit 0e7211c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/electrode-archetype-react-app/support/babel-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ try {

// fallback to default action that loads babel-register and then requires
// src/server, under which there should be an index.js file.
require("babel-register")({ only: x => x.startsWith(cwd) && !x.startsWith(cwdNM) });
require("babel-register")({ only: x => {
x = Path.normalize(x);
return x.startsWith(cwd) && !x.startsWith(cwdNM);
}});
require(Path.resolve(serverDir));
}

0 comments on commit 0e7211c

Please sign in to comment.