Skip to content
This repository was archived by the owner on Jul 31, 2018. It is now read-only.
This repository was archived by the owner on Jul 31, 2018. It is now read-only.

WRT PR #3 - ES module detection #13

Closed
@bmeck

Description

@bmeck

This is the place to discuss specifics of how node will determine the mode a given a source (file / source string). Source string examples include stdin or -e, they do not include JS Function or eval calls. The proposal itself can be seen in PR #3.

Discussions here should regard:

  • Ways to detect the module target for a specific source
  • Impact of detecting the module on other environments
    • How other environments will provide the detection in the case of interoperability
  • Potential incompatibilities introduces for existing workflows with module detection possibilities.
  • Transition goals for a time when ES modules are the normal target.

Note: CJS will be the default target of node for the foreseeable future, "normal" here means what developers write daily. This is a constraint that can be easily worked around for a single source via a cli flag to note that the source is an ES module. This flag should not be seen as relevant to the discussion in this thread.

Note: We are only discussing choices that do not require parsing of the source file.

It should not discuss import/export conversion, evaluation ordering, or module path resolution.

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