Skip to content

No serializer when building with Embroider #2579

@bartocc

Description

@bartocc

When building our app with embroider, many tests fail because the serializer is not properly loaded by mirage and ember-data errors telling us that the response does not contain the required fields, like data

I've tracked this down to https://github.com/miragejs/ember-cli-mirage/blob/master/packages/ember-cli-mirage/addon/utils/read-modules.js, where ember-cli-mirage tries to find module names like my-app/serializers/*, etc…

But when the mirage folder is a sibling of the app folder, these modules do not exit in the final build because Embroider does not consume the mirage folder

I've tried moving the mirage folder inside the app folder, and both a classic build and an embroider build seem to work…

Is that a workaround you would recommend? I wonder if doing so, the mirage files would not end up in the prod build 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions