diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-04-17 00:20:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 07:20:48 +0800 |
commit | 83f42ede367316193205572a04959098b45e711d (patch) | |
tree | 24c79e434bfd00aa47c85ed9f84b5dbd6a8056a9 /README.md | |
parent | 0ce71bbec0c9f0d49ec86f8b959f12a7bf9df21d (diff) | |
download | tracifyjs-83f42ede367316193205572a04959098b45e711d.tar.gz tracifyjs-83f42ede367316193205572a04959098b45e711d.zip |
support optional output of `names` in source maps (#3784)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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='<URL>'"` 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='<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 |