Index: webpack_runner.js |
diff --git a/webpack_runner.js b/webpack_runner.js |
index 437bec1c7855d01e80c22c2258048f098757762e..b04016265abc109cbb9597c2bb5fdc8fc10c5742 100644 |
--- a/webpack_runner.js |
+++ b/webpack_runner.js |
@@ -137,9 +137,11 @@ process.stdin.on("end", () => |
for (let config of options) |
{ |
let filepath = path.join(config.output.path, config.output.filename); |
- let mappath = filepath + ".map"; |
- files[filepath] = memoryFS.readFileSync(filepath, "utf-8"); |
- files[mappath] = memoryFS.readFileSync(mappath, "utf-8"); |
+ let relativeFilepath = path.relative("/", filepath); |
+ files[relativeFilepath] = memoryFS.readFileSync(filepath, "utf-8"); |
+ files[relativeFilepath + ".map"] = memoryFS.readFileSync( |
+ filepath + ".map", "utf-8" |
+ ); |
} |
console.log(JSON.stringify(files)); |