Skip to content

Conversation

privatenumber
Copy link
Owner

@privatenumber privatenumber commented Nov 10, 2023

This is an experiment to leverage Node's new ESM detection (nodejs/node#50096) to replace the CommonJS loader.

Currently, the tests fail with require is not defined so we won't be able to use this (at least without a breaking change).

Seems like Node expects ambiguous ESM files to be written in strict ESM (e.g. no use of require(), __filename, etc.). In contrast, tsx compiles ESM to CJS (loose ESM) so it allows a mix of both ESM and CJS syntax.

@privatenumber privatenumber deleted the branch develop April 26, 2024 09:56
@privatenumber privatenumber deleted the detect-module branch April 28, 2024 21:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant