Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: webpack_runner.js

Issue 29573821: Issue 5535 - Bundle paths should be relative in the files dict (Closed)
Patch Set: Created Oct. 11, 2017, 5:13 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld