Skip to content

CJS entry point can't be loaded in Node.js #649

@inukshuk

Description

@inukshuk

I might be doing something wrong, but I believe there is an issue with the current dual package setup. Type is set to module but the CJS entry point main points to "dist/tween.cjs.js". Despite the .cjs in there the Node.js loader still sees the final .js extension. Based on the nearest package.json it will therefore default to using the ESM loader for this file.

As a result, you can't currently require('@tweenjs/tween.js') in Node. Unless I'm missing something the .js extension should be dropped.

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