Skip to content

Resolve *.mjs entrypoints #1273

@idleberg

Description

@idleberg

Until recently, my extensions either used *.js or *.cjs for the main in the package manifest, both extensions could be resolved just fine.

Since VSCode 1.100, extensions can be published as ESM. By bundler (tsdown) will produce *.mjs files by default. This will produce an error when trying to publish the extension:

Extension entrypoint(s) missing. Make sure these files exist and aren't ignored by .vscodeignore.

One could argue that ESM extensions should use exports (not main). This will get me through the publishing process, but it produces runtime errors in VSCode. Packages copied to the extension folder with *.mjs in main will work fine – the problem is vsce not being able to publish them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions