I like to keep my code modular, so I put this kind of code in a separate file (overrides/extra.js
):
import Ember from 'ember';
Ember.RSVP.configure('onerror', function(error) {
....
});
export default null;
This has only the side effect of configuring Ember.RSVP
but does not export anything of value. I would then import this in app.js
:
import dummy from './overrides/extra';
Is this accepted practice?
Aucun commentaire:
Enregistrer un commentaire