Skip to content

Commit

Permalink
minify leaflet scripts using uglifier (#8159)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlazypanda authored Aug 18, 2020
1 parent 9aa09b7 commit 563d229
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Compress JavaScripts and CSS
config.assets.compress = true
config.assets.js_compressor = Uglifier.new(harmony: true)
Uglifier.new(harmony: true).compile(File.read("public/lib/leaflet-environmental-layers/dist/LeafletEnvironmentalLayers.js"))
Uglifier.new(harmony: true).compile(File.read("public/lib/leaflet-environmental-layers/lib/glify.js"))

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
Expand Down

0 comments on commit 563d229

Please sign in to comment.