Rails, sprockets, google closure and advanced opts -
i've added closure-compiler gem gemfile , set
config.assets.js_compressor = :closure
in config/environments/production.rb file.
i believe defaults using simple_optimizations compilation level , wondering if there config variable can set somewhere specify advanced level instead.
i tried digging through sprockets code haven't found way pass options js_compressor yet.
check out issue: https://github.com/rails/rails/issues/2693
to put in simple terms, given solution is:
# config.assets.js_compressor = :closure require 'closure-compiler' config.assets.js_compressor = closure::compiler.new(compilation_level: 'advanced_optimizations')
Comments
Post a Comment