Skip to content

Allow runtime to handle CJS #7

@yorinasub17

Description

@yorinasub17

Right now, the runtime only works with ESM code and ESM node modules (specifically, node modules that specify a module attr in the package.json). For better compatibility, we should add support CJS by adding in the CJS translation layer.

This can be implemented using https://github.com/denoland/deno/blob/9010b8df53cd37f0410e08c43a194667974686a2/ext/node/analyze.rs#L44

However, implementing this requires some dependency injection, namely the CJS analyzer and FS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions