Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Use Uglifier Harmony mode
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michaelbaudino committed Dec 11, 2018
1 parent 6ed9d0b commit ac41b4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/initializers/uglifier.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

# Use Harmony mode of Uglifier, to support ES6 syntax
# see https://github.com/lautis/uglifier#es6--es2015--harmony-mode
Rails.application.config.assets.js_compressor = Uglifier.new(harmony: true)

0 comments on commit ac41b4d

Please sign in to comment.