Skip to content

Add auto import setting to add file extension to relative imports #36508

Closed
@mjbvz

Description

@mjbvz

(Splitting out auto import case from #28288)

Feature Request
Add an option that lets users control if a file extension should be added when importing a file within the current project.

Currently auto import adds imports without a file extension:

import { abc } from './foo'

console.log(abc);

With the new option, we'd instead add the import as:

import { abc } from './foo.js'

console.log(abc);

Related Issues:

/cc @RyanCavanaugh

Activity

added
VS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone
and removed
VS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone
on Jan 29, 2020
mjbvz

mjbvz commented on Jan 29, 2020

@mjbvz
ContributorAuthor

Actually I totally already opened this issue two years ago: #24779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @mjbvz

        Issue actions

          Add auto import setting to add file extension to relative imports · Issue #36508 · microsoft/TypeScript