Skip to content

Docs: Difference between esnext, es6, es2015 module targets #24082

@bcherny

Description

@bcherny

Search Terms

esnext, es6, es2015, module, tsconfig, tsconfig.json, difference, document

Suggestion

It would be great if this can be documented. On the face of it, the output for all three seems to be identical.

Related: It would also be nice to document why targeting module: "none" when your code is a module (ie. uses ES2015 imports/exports) generates CommonJS-compatible code instead of exporting to globals as "none" seems to imply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThe issue relates to how you learn TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions