Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

native es-Module IntelliSense import does not import correct path. #85502

Closed
xXACCEXx opened this issue Nov 24, 2019 · 1 comment
Closed

native es-Module IntelliSense import does not import correct path. #85502

xXACCEXx opened this issue Nov 24, 2019 · 1 comment
Assignees
Labels
javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@xXACCEXx
Copy link

Version: 1.40.1
Commit: 8795a98
Date: 2019-11-13T16:49:30.162Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.0.0-31-generic snap

Steps to Reproduce:

  1. Create an ES Module and export something
    export const something = 'something';
  2. Create another file and start typing 'something' to trigger suggestions
    image
  3. Press 'Enter' or something to apply this prompt
    image (1)
  4. Run in Browser (or Node.js with --experimental-modules flag)
    image

Does this issue occur when all extensions are disabled?: Yes

My goal is to import files using the IntelliSense prompts for the correct module (native JS with ES Modules).

I would expect the path to be correctly injected, however the extension is missing, which does not comply with ES module standards for paths.

What I am seeing instead, is an almost complete path. But it is missing the file extension (if it is needed)

Currently, I am supplying the file extension manually afterwards the IntelliSense inserts the path.

This is only a problem when using ES Modules and browser/Node.js, as the cjs pattern is fine with resolving the extension (either at compile or run time, respectively)

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 25, 2019

Thanks for the detailed report. This is currently tracked upstream by microsoft/TypeScript#28288

I've marked it as a priority feature for TS since we see this reported fairly often

@mjbvz mjbvz closed this as completed Nov 25, 2019
@mjbvz mjbvz added javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream labels Nov 25, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

2 participants