Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mjbvz opened this issue Jan 29, 2020 · 1 comment
Closed

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

mjbvz opened this issue Jan 29, 2020 · 1 comment

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jan 29, 2020

(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

@mjbvz mjbvz added VS Code Priority Critical issues that VS Code needs fixed in the current TypeScript milestone and removed VS Code Priority Critical issues that VS Code needs fixed in the current TypeScript milestone labels Jan 29, 2020
@mjbvz
Copy link
Contributor Author

mjbvz commented Jan 29, 2020

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

@mjbvz mjbvz closed this as completed Jan 29, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant