<commit_before># standard-minifier-js
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/standard-minifier-js) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/standard-minifier-js)
***

Standard Minifier for JS
========================

This package provides a minifier plugin used for Meteor apps by default. The behavior
of this plugin during a development build is that all JS files will not be minified, 
they will include a source map, and are sent to the client as seperate files. The behavior 
during a production build is that all JS files are concatenated into a single, minified JS 
file and this file will not include a source map.

The JS minifier package uses `Terser` version `4.6.6` as of `Meteor` version `1.10.1`. The options 
we setting that differ from the default settings are the following:

```
drop_debugger: false
unused:        false 
safari10:       true
```

The rest of the minification options are the default values that `Terser` uses out of the box.
Additionally, we are only making a single pass over the source in order to compress the 
output and this could be something we want to increase in the future. JS files are only
minified during a production build and the extra time spent on a second or third pass
may be worth the improved compression.<commit_msg>updated the markdown file to better document this package<commit_after># standard-minifier-js
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/standard-minifier-js) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/standard-minifier-js)
***

Standard Minifier for JS
========================

This package provides a minifier plugin used for Meteor apps by default. 

The behavior of this plugin in development and production modes are depicted below
in the table.


|               | DEV   | PROD   |
|---------------|:-----:|:------:|
| Minified      |   N   |    Y   | 
| Concatenated  |   N   |    Y   | 
| Source Map    |   Y   |    N   | 



The options that are set that differ from the default settings are the following:

```
drop_debugger: false
unused:        false 
safari10:       true
```

It should also be noted that by default terser will make one pass while compressing 
source code, but additional passes could be configured to increase compression.
{'fraction_non_alphanumeric': 0.0952970297029703, 'fraction_numerical': 0.004537953795379538, 'mean_word_length': 3.627862595419847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1871956', 'n_tokens_mistral': 670, 'n_tokens_neox': 639, 'n_words': 302}