I have a Rails project where a newly added javascript file (plotly.min.js
) is causing rake assets:precompile
to hang indefinitely in production mode only. Since the problem is related to javascript compression, I would like to enable verbose logging for Uglifier. I can see that this is possible for the UgligyJS2 command line tool, but my question is how to enable this from my Rails app, preferable in an initializer or the like. I can solve the issue by changing my javascript compressor to closure-compiler
, but I would like to identify the problem with uglifier.
Enable Uglifier verbose logging in Sprockets-Rails
653 Views Asked by ronan_mac At
2
There are 2 best solutions below
1

Sadly I don't have a proper answer to this problem either (I solved it for now by disabling the uglifier in production):
# Compress JavaScripts and CSS.
# KT TODO: reenable js compression
# config.assets.js_compressor = :uglifier
... but just to confirm that I ran into the same problem with uglifier and plotly.js.
You need to override the sprockets logger in the initializer: