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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -