-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
FIX: Use Terser for minification even if uglify-js is not available #13683
Conversation
Thanks @talyz, there is a TODO on line 105 in this file
Since the base image now has terser, we can simply remove support for uglifyjs entirely. If you want to make that change in this PR, I'm happy to approve. |
Sure! Maybe I should say that I'm not actually using the docker image - I maintain the |
Added a fixup now. If it looks good to you and you prefer to remove |
This looks good @talyz, I'll just wait for the tests to pass (they should) and then I'll approve. I'll handle the squashing when merging as well. (Sorry to add work to your plate by removing |
Great! Yeah, it's no big deal, really. :) |
Changes look good to me so I'm merging this. Thank you for your contribution @talyz |
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.
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.
In #12656, the default js minifier was switched to Terser from uglify-js, but in order for Terser to be used, uglify-js still has to be around. This fixes that.