Skip to content

es6 build needs to use mjs file extension or specify "type": "module" in a parent package.json file. #15

Description

@segevfiner

Without this, more strict bundlers and Node's ESM mode won't be able to import the es6 build of jscrypto.

e.g. From vitest:

SyntaxError: Cannot use import statement outside a module
Module .../node_modules/.pnpm/jscrypto@1.0.3/node_modules/jscrypto/es6/lib/random.js:1 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "jscrypto" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.

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