jeudi 22 décembre 2016

Prevent removal of Ember.deprecate in production

My goal is to log deprecation warnings to a server so they can be tracked. The code for this is already built by hooking into registerDeprecationHandler. The thought was that by doing this, we coudl essentially crowd source our deprecation warnings so it is easier to resolve them later. However, this does not end up working in production.

In Ember docs for Ember.deprecate it states:

In a production build, this method is defined as an empty function (NOP). Uses of this method in Ember itself are stripped from the ember.prod.js build.

Is there any way to prevent Ember from removing Ember.deprecate from the production build? I feel like there ought to be an environment setting or something that controls this.. I was surprised that Ember was doing this at all because it seems like something that should be an opt-in feature.




Aucun commentaire:

Enregistrer un commentaire