Skip to content

Incorrect CJS import with esmoduleInterop: true #1971

@beeequeue

Description

@beeequeue

Repro: https://github.com/BeeeQueue/esbuild-cjs-no-default

TL;DR: import core from "@actions/core" generates invalid code which fails when running, presumably because it does something funky with the exports somewhere.

I tried to look around a bit to see if I could find what they're doing weird but couldn't find anything myself.

It can be worked around with import * as, but if that is the intended behavior there should probably be a warning about it.

Maybe related to #1079?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions