From 83f42ede367316193205572a04959098b45e711d Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 17 Apr 2020 00:20:48 +0100 Subject: support optional output of `names` in source maps (#3784) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 7e07cc87..c22808d8 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ a double dash to prevent input files being used as option arguments: `includeSources` Pass this flag if you want to include the content of source files in the source map as sourcesContent property. + `names` Include symbol names in the source map. `root` Path to the original source to be included in the source map. `url` If specified, path to the source map to append in @@ -159,6 +160,9 @@ Additional options: - `--source-map "root=''"` to pass the URL where the original files can be found. +- `--source-map "names=false"` to omit symbol names if you want to reduce size + of the source map file. + - `--source-map "url=''"` to specify the URL where the source map can be found. Otherwise UglifyJS assumes HTTP `X-SourceMap` is being used and will omit the `//# sourceMappingURL=` directive. @@ -593,6 +597,9 @@ var result = UglifyJS.minify({"compiled.js": "compiled code"}, { If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.url`. +If you wish to reduce file size of the source map, set option `sourceMap.names` +to be `false` and all symbol names will be omitted. + ## Parse options - `bare_returns` (default `false`) -- support top level `return` statements -- cgit v1.2.3