Skip to content

Discussion: Name of the flag for the “ESM by default” mode #49541

Open
@GeoffreyBooth

Description

@GeoffreyBooth

Building off of #49432, what should the flag be named for this proposed new mode? Yes, this is the bikeshed thread.

I think we have a few constraints:

  • Whatever we choose needs to begin with --experimental (for now, until it goes stable).
  • It needs to either be a flag that takes a value, like our existing --input-type=module / --input-type=commonjs; or have an obvious opposite, so that if/when this new mode becomes the new Node default there’s some way to opt back into the previous CommonJS-first behavior.
  • If it takes a value, those values should be module and commonjs for consistency with the existing --input-type and the package.json "type" field.
  • We shouldn’t pick --experimental-module because there was a prior flag named --experimental-modules which still exists as a noop, and it would be confusing to users if nothing happens when they try to use the flag but made a typo.

Please vote using emoji:

  • 🚀 --experimental-type=module / --experimental-type=commonjs
  • 🎉 --experimental-default-type=module / --experimental-default-type=commonjs
  • ❤️ --experimental-implicit-type=module / --experimental-implicit-type=commonjs
  • 👀 --experimental-esm-by-default / --no-experimental-esm-by-default

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssues and PRs related to the Node.js command line interface.esmIssues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions