Search code examples
ember-cli-mirageember-cli-rails

Remove ember-cli-mirage from ember


I am using ember-cli-mirage to serve for requests. As I have my rails api to serve those request, how i shd remove or uninstall ember-cli-mirage from my ember ?

If am removing mirage folder, am getting build error !!


Solution

  • You should leave Mirage installed (and the folder on disk) but disable the server whenever you want to use your actual backend API. This will let you use Mirage in selective environments, for example in testing.

    By default, Mirage is disabled in production, and also in development when using the -proxy option.

    To disable Mirage explicitly, you can set the enabled config option to false. For example, to always disable in development:

    // config/environment.js
    ...
    if (environment === 'development') {
      ENV['ember-cli-mirage'] = {
        enabled: false
      };
    }