JavaScript Enable Uglifier verbose logging in Sprockets-Rails

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.

Answer:1

You need to override the sprockets logger in the initializer:

if Rails.env.production?
  Rails.application.assets.logger = Logger.new($stdout)

  # This sets the log level to debug
  Rails.application.assets.logger.level = 0
end
Answer:2

I have the following state. state = { friends: { nickNames: ['Polly', 'P', 'Pau'], ... here more k:v }, } } And I want to update nickNames array with a value coming from an ...

I have the following state. state = { friends: { nickNames: ['Polly', 'P', 'Pau'], ... here more k:v }, } } And I want to update nickNames array with a value coming from an ...

  1. immutable update nested object
  2. immutable update nested map
  3. immutable update nested list
  4. immutability-helper update nested object
  5. immutable js update nested object

I have setup ionic push for Android and IOS, the android version works great, but the IOS doesn't. I have setup the provisioning and certificate files on IOS and they seem to be fine. Also, the ...

I have setup ionic push for Android and IOS, the android version works great, but the IOS doesn't. I have setup the provisioning and certificate files on IOS and they seem to be fine. Also, the ...

  1. debug push notifications ios
  2. debug push notifications android
  3. debug push notifications
  4. chrome debug push notifications
  5. debug production push notifications
  6. xcode debug push notification
  7. debug apns push-notification
  8. debug apple push notification service
  9. send debug push notification
  10. ios debug production push notifications
  11. ionic debug push notification

Currently, I am facing one issue related to angularjs directive. I want to send outlet object from directive1 to directive2. Both directives having same controller scope. I tried with emitting event ...

Currently, I am facing one issue related to angularjs directive. I want to send outlet object from directive1 to directive2. Both directives having same controller scope. I tried with emitting event ...

  1. share data between components angular
  2. share data between docker containers
  3. share data between google sheets
  4. share data between processes
  5. share data between switch and switch lite
  6. share data between threads java
  7. share data between sibling components angular
  8. share data between iphone and ipad
  9. share data between fragments
  10. share data between components react
  11. share data between processes python
  12. share data between threads python
  13. share data between components vue
  14. share data between apps ios
  15. share data between iphones
  16. share data between threads c++
  17. share data between classes c++
  18. share data between controllers angularjs
  19. share data between android phones
  20. share data between apps android

In the following code, the $compile is not working. I have an item, I am adding this item to scope, so that I can compile this and get an html. $http({ method: 'GET', url :...

In the following code, the $compile is not working. I have an item, I am adding this item to scope, so that I can compile this and get an html. $http({ method: 'GET', url :...

  1. angularjs $compile not working
  2. angularjs works compile
  3. angularjs directive compile not working
  4. angularjs compile ng-click not working