Skip to content

Breaks ES Modules #3

Open
Open
@jwarkentin

Description

@jwarkentin

When transpiling to ES Modules (including setting "type": "module" in package.json) this breaks Jest tests with the error:

ReferenceError: module is not defined

It seems it doesn't take the targeted build type into account and just assumes it's building CommonJS modules. I know the options are limited and I'm not certain what the best solution is, but since ES Module adoption is only increasing it would be nice to have the option to not produce a broken build with Jest. Just wanted to at least raise the issue for consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions