Skip to content

ESM: exports not utilised when importing CJS. #29537

Closed
@joeyhub

Description

@joeyhub

Version: v12.10.0
Platform: msdos, x86_16
Subsystem: ESM

Using "type": "module" and an mjs as an entry point, module isn't uses from package.json and when falling back to main (CJS), using purely exports rather than assigning module.exports doesn't appear to work.

Seen when trying to use rollup-plugin-analyzer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions