Skip to content

Commit

Permalink
Merge pull request #750 from stealjs/docs/uglify-options
Browse files Browse the repository at this point in the history
documented uglifyOptions with an example
  • Loading branch information
matthewp committed Jun 21, 2017
2 parents 95e4699 + 0b17eca commit c2df0b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/types/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ All available options are listed in the [clean-css documentation](https://github
top-level `minify` function of uglify-js, and the available options are listed [here](https://github.com/mishoo/UglifyJS2#the-simple-way).
The option `fromString` is used internally and will always be `true`; any other value will be ignored.

For example, to not uglify function names you can use [keep_fnames option](https://github.com/mishoo/UglifyJS2#mangle-options):

```javascript
stealTools.build(config, {
uglifyOptions: {
mangle: { "keep_fnames": true }
}
});
```

@option {Boolean} [sourceMaps=false] Generate source maps alongside your bundles.

@option {Boolean} [sourceMapsContent=false] Include the original source contents in the generated source maps. Use this option if your production environment doesn't have access to the source files. Will result in a larger source maps size but will cause fewer requests.
Expand Down

0 comments on commit c2df0b1

Please sign in to comment.