diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index f71d4b9ea3b..69168072590 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -1068,20 +1068,20 @@ Possible options for JavaScript compression are `:terser`, `:closure`, `:uglifie `:yui`. These require the use of the `terser`, `closure-compiler`, `uglifier` or `yui-compressor` gems, respectively. -Take the `uglifier` gem, for example. -This gem wraps [UglifyJS](https://github.com/mishoo/UglifyJS) (written for +Take the `terser` gem, for example. +This gem wraps [Terser](https://github.com/terser/terser) (written for NodeJS) in Ruby. It compresses your code by removing white space and comments, shortening local variable names, and performing other micro-optimizations such as changing `if` and `else` statements to ternary operators where possible. -The following line invokes `uglifier` for JavaScript compression. +The following line invokes `terser` for JavaScript compression. ```ruby -config.assets.js_compressor = :uglifier +config.assets.js_compressor = :terser ``` NOTE: You will need an [ExecJS](https://github.com/rails/execjs#readme) -supported runtime in order to use `uglifier`. If you are using macOS or +supported runtime in order to use `terser`. If you are using macOS or Windows you have a JavaScript runtime installed in your operating system. ### GZipping your assets diff --git a/guides/source/configuring.md b/guides/source/configuring.md index f0eeb15e922..0a524606c10 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -172,7 +172,7 @@ pipeline is enabled. It is set to `true` by default. * `config.assets.css_compressor` defines the CSS compressor to use. It is set by default by `sass-rails`. The unique alternative value at the moment is `:yui`, which uses the `yui-compressor` gem. -* `config.assets.js_compressor` defines the JavaScript compressor to use. Possible values are `:closure`, `:uglifier` and `:yui` which require the use of the `closure-compiler`, `uglifier` or `yui-compressor` gems respectively. +* `config.assets.js_compressor` defines the JavaScript compressor to use. Possible values are `:terser`, `:closure`, `:uglifier` and `:yui` which require the use of the `terser`, `closure-compiler`, `uglifier` or `yui-compressor` gems respectively. * `config.assets.gzip` a flag that enables the creation of gzipped version of compiled assets, along with non-gzipped assets. Set to `true` by default.