Skip to content

module: esnext should append .js to imports #33588

Closed
@amitport

Description

@amitport

TypeScript Version: 3.4.0-dev.201xxxxx

Search Terms:
modules

Code
having a local-lib.ts

index.ts

import X from 'local-lib'

should compile with "module": "esnext" to (probably in combination with new extension rewriting flags):

import X from 'local-lib.js'

Expected behavior:
.js should be appended to imports of local es modules
(this is required in node and browser modules support)

Actual behavior:
no .js
Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions