-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityjavascriptJavaScript support issuesJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)
Description
- VSCode Version: Code 1.17.0 (be377c0, 2017-10-05T06:07:51.906Z)
- OS Version: Darwin x64 16.7.0
- Extensions:
Extension | Author (truncated) | Version |
---|---|---|
Handlebars | and | 0.2.0 |
vscode-eslint | dba | 1.3.2 |
prettier-vscode | esb | 0.24.0 |
vscode-import-cost | wix | 2.5.0 |
Steps to Reproduce:
- Open or create a JavaScript file
- Start typing
import x from './
followed by the name of a sibling file
Reproduces without extensions: Yes
When you start writing a local import
statement, the intellisense helper will offer up foo
and bar
rather than foo.js
and bar.js
. Extensionless imports is a Node idiom that is incompatible with browser module loaders — adding the file extension would increase browser compatibility with no ill-effect on Node apps (to the contrary, it speeds up module resolution, and I'd argue it makes code more explicit and readable).
I wonder if you would consider changing the behaviour to add file extensions by default?
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityjavascriptJavaScript support issuesJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)