fix corner cases in sourceMap (#3397)

fixes #3255
fixes #3294
This commit is contained in:
Alex Lam S.L
2019-05-04 20:08:57 +08:00
committed by GitHub
parent a89d424a0b
commit 11cdab745d
9 changed files with 69 additions and 9 deletions

View File

@@ -169,6 +169,18 @@ describe("sourcemaps", function() {
map = JSON.parse(result.map);
assert.ok(!("sourcesContent" in map));
});
it("Should parse the correct sourceMappingURL", function() {
var result = UglifyJS.minify(read("./test/input/issue-3294/input.js"), {
compress: { toplevel: true },
sourceMap: {
content: "inline",
includeSources: true,
url: "inline"
}
});
if (result.error) throw result.error;
assert.strictEqual(result.code + "\n", readFileSync("test/input/issue-3294/output.js", "utf8"));
});
});
describe("sourceMapInline", function() {