You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add file extensions when auto-completing import paths #35730
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?
Activity
mjbvz commentedon Oct 8, 2017
This issue was moved to microsoft/TypeScript#19019