Skip to content

Commit

Permalink
minify leaflet scripts using uglifier (publiclab#8159)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlazypanda authored and billymoroney1 committed Dec 28, 2021
1 parent 58ff62e commit aae8e24
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 aae8e24

Please sign in to comment.