mercredi 6 mai 2015

Cannot extend RESTAdapter in Ember.js in development environment. In production all fine

Faced a strange problem tonight. I have the following RESTAdapter settings:

app/adapters/application.js:

import DS from "ember-data";

var ApplicationAdapter = DS.RESTAdapter.extend ( {
    namespace: 'api'
} );

export default ApplicationAdapter;

If I build project with ember build --environment=production it works flawlessly. But if I build project with just ember build, Ember just ignores my definition and namespace becomes empty string (my ApplicationAdapter is completely ignored).

Making it App.ApplicationAdapter in app/app.js doesn't help either. In production mode everything is again fine.

Is it a bug or do I miss something?




Aucun commentaire:

Enregistrer un commentaire