Skip to content

[ESM] Incorrect default export, causing issue in Vite-powered projects when loaded as ESM #277

@NamesMT

Description

@NamesMT

https://arethetypeswrong.github.io/?p=eventemitter3%405.0.1

In projects that uses Vite and use something like: https://github.com/antfu/vite-plugin-optimize-exclude, eventemitter3 is excluded from automatic deps re-bundling, and will be loaded as an ESM module directly.

But it seems like the export is not correct, and it will break, throwing: Requested module does not provide export named 'default'.

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