From b19db0f0c0a7a6f5ea108ca2891a011e11cd66e8 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Mon, 12 Oct 2015 21:22:34 +0600 Subject: [PATCH] Fix coffeescript source maps. The file paths on Windows should be URLs with proper slashes and starting with file:/// --- src/coffee-script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coffee-script.js b/src/coffee-script.js index 90f23bfa5..967d07cdd 100644 --- a/src/coffee-script.js +++ b/src/coffee-script.js @@ -29,6 +29,10 @@ exports.compile = function (sourceCode, filePath) { Error.prepareStackTrace = previousPrepareStackTrace } + if (process.platform === 'win32') { + filePath = 'file:///' + path.resolve(filePath).replace(/\\/g, '/') + } + var output = CoffeeScript.compile(sourceCode, { filename: filePath, sourceFiles: [filePath],