Skip to content

Autocompleted JavaScript imports do not include file extension #51259

@coderpatsy

Description

@coderpatsy
  • VSCode Version: 1.24.0
  • OS Version: Windows 8.1

This problem was first noticed a couple days ago on 1.23.1, but I waited for the new release.

Steps to Reproduce:

  1. Have a module file with an export, say export.js
export function exampleExport() { }
  1. In another blank js file, start typing the name of your export and autocomplete it.
    exam [tab] becomes
import { exampleExport } from "./export";

exampleExport

Note that it it's trying to import from "./export", not from "./export.js". This breaks the import, at least in a browser context.

Does this issue occur when all extensions are disabled? Yes

Metadata

Metadata

Assignees

Labels

javascriptJavaScript support issuestypescriptTypescript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions