Make sourcemaps work for bable & typescript on Windows

This commit is contained in:
Damien Guard
2016-09-09 13:45:33 -07:00
parent 77a09a7447
commit 61c5f37e20
2 changed files with 8 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ exports.compile = function (sourceCode, filePath) {
Logger.prototype.verbose = noop
}
if (process.platform === 'win32') {
filePath = 'file:///' + path.resolve(filePath).replace(/\\/g, '/')
}
var options = {filename: filePath}
for (var key in defaultOptions) {
options[key] = defaultOptions[key]