Use Uglifier Harmony mode - #62
Conversation
ac41b4d to
7858460
Compare
ghost
left a comment
There was a problem hiding this comment.
Let's remove the unneeded magic comment and remove the comment, then merge it.
| @@ -0,0 +1,7 @@ | |||
| # frozen_string_literal: true | |||
There was a problem hiding this comment.
There are no string literals in this file.
There was a problem hiding this comment.
I know, but our Rubocop ruleset makes the magic comment mandatory 🤷♂️
There was a problem hiding this comment.
OK, maybe we could reconsider whilelisting rules vs. blacklisting? ;-)
This commit overrides the default Rails configuration to use the Harmony mode of Uglifier, which support ES6 syntax, as mentioned in their README file: https://github.com/lautis/uglifier#es6--es2015--harmony-mode
7858460 to
60a228f
Compare
|
I was going to merge, but I'll avoid since the build is "broken". |
|
Hrm, it's interesting 🤔 The current offense is actually due to our codestyle disabling It expects us to rewrite this Rails.application.config.assets.js_compressor = Uglifier.new(harmony: true) if Rails.application.config.assets.js_compressor == :uglifierWhich is actually obviously too long 🤷♂️ I see 3 options here:
What do you think? |
|
I agree that Rubocop suggestion isn't acceptable here :-(
So personally, I'd go with first option. |
This commit overrides the default Rails configuration to use the Harmony
mode of Uglifier, which support ES6 syntax, as mentioned in their README
file:
https://github.com/lautis/uglifier#es6--es2015--harmony-mode