Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Use Terser for JS minification/compression if available #12656

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

pmusaraj
Copy link
Contributor

@pmusaraj pmusaraj commented Apr 8, 2021

Switches to Terser for JS compression, it is faster compared to uglify-js and supports more recent JS syntax (like the optional chaining operator).

Uglify-js is still used if terser is unavailable, but it will be removed at the next base image bump.

@pmusaraj pmusaraj merged commit e77b9df into master Apr 9, 2021
@pmusaraj pmusaraj deleted the terser-js-compression branch April 9, 2021 12:51
talyz added a commit to talyz/nixpkgs that referenced this pull request Jul 14, 2021
Discourse prefers to use `terser` when building js assets, see
discourse/discourse#12656. It still wants to
find `uglify-js` in order to not fall back to a ruby js compression
library, so let's keep it around for now. A fix for this has been
submitted upstream in
discourse/discourse#13683.
dpausp pushed a commit to dpausp/nixpkgs that referenced this pull request Oct 5, 2021
Discourse prefers to use `terser` when building js assets, see
discourse/discourse#12656. It still wants to
find `uglify-js` in order to not fall back to a ruby js compression
library, so let's keep it around for now. A fix for this has been
submitted upstream in
discourse/discourse#13683.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants