This addon will break when used together with ember-cli-mirage
See original GitHub issueIt took us a while to figure out what the problem is but in our application we use both ember-data-change-tracker
and ember-cli-mirage
. After upgrade from 0.7.7
to 0.8.0
we noticed that if Mirage is enabled, methods like startTrack()
are missing on all models.
I found a fix, it’s about adding before: 'ember-cli-mirage'
to https://github.com/danielspaniel/ember-data-change-tracker/blob/master/app/initializers/ember-data-change-tracker.js
But the problem is it will fail in case ember-cli-mirage
is not present in the project. I was also trying to debug ember-cli-mirage
but I wasn’t able to find any place which I could fix to make this addon work.
Maybe authors of this addon would have some idea how to fix it. I’m not that familiar with the internals of Ember.js. The help would be very appreciated. Thank you
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
moving the initializer before ember-cli-mirage fixed it for me:
@Leooo yes, that’s the fix described in my first comment and that’s exactly what we ended up doing in our fork: https://github.com/bayzat/ember-data-change-tracker/commit/ec2d6c16ba0fa4fb5e8274ed075aa23807fce4ce
But it has this downside that it will break in case
ember-cli-mirage
is not installed (for us it’s not a problem because we used for all our modules currently).