Skip to content

Commit 057c9c6

Browse files
committed
Merge pull request #316 from shibukawa/fix/windows-abs-path
fix error when compile jsx code with absolute path on Windows
2 parents 78c3bcf + 51f5211 commit 057c9c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsx-node-front.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class NodePlatform extends Platform {
5757
}
5858

5959
function _absPath(path : string) : string {
60-
return (path.charAt(0) == "/" || path.match(/^[a-zA-Z]:\//))
60+
return (path.charAt(0) == "/" || path.match(/^[a-zA-Z]:[\/\\]/))
6161
? path // path is already absolute
6262
: this._cwd + "/" + path;
6363
}

0 commit comments

Comments
 (0)