Skip to content

No way to specify --prefix for relative source map to .minify #136

@natevw

Description

@natevw

If I pass in an array of local file paths to UglifyJS.minify with outSourceMap, these will get used verbatim in the output map. So when I host the files, they include all the path components of my local filesystem e.g. "/Users/natevw/Dev/my-project/includes/code.js".

The code that implements the prefix is only in the command line utility:
https://github.com/mishoo/UglifyJS2/blob/master/bin/uglifyjs#L212

As a workaround I guess I will try to change the working directory of my script and make relative the paths in such a way to make them appear right in use 😬

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions