Skip to content

API outSourceMap documented wrong #912

@pwang2

Description

@pwang2

Quoted from the Doc here.

To generate a source map:
var result = UglifyJS.minify([ "file1.js", "file2.js", "file3.js" ], {
outSourceMap: "out.js.map"
});
console.log(result.code); // minified output
console.log(result.map);
Note that the source map is not saved in a file, it's just returned in result.map. The value passed for outSourceMap is only used to set the file attribute in the source map (see the spec).

outSourceMap is pointed to the mapfile. But in the spec (https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit),
Line 3: An optional name of the generated code that this source map is associated with.
It should be the js file where source map associated with.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions