Skip to content

tsserver with "module": "Preserve" and "moduleResolution": "Bundler" adds .js extensions to imports #59200

Closed as not planned

Description

🔎 Search Terms

Preserve, Bundler, .js extension

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about completions

⏯ Playground Link

https://github.com/segevfiner/typescript-js-extension-issue

💻 Code

Completion in the "./foo" in the lines below uncommented results in ./foo.js despite using "moduleResolution": "Bundler".

// import { FOO } from "./foo";
// import { FOO } from "./foo.js";

🙁 Actual behavior

It completes to ./foo.js

🙂 Expected behavior

It should complete to ./foo as we are in "moduleResolution": "Bundler" but "module": "Preserve" causes it to add the js extension.

Additional information about the issue

No response

Activity

  1. added
    Domain: LS: Completion Lists
    on Oct 16, 2025
  2. RyanCavanaugh commented on Dec 3, 2025

    @RyanCavanaugh
    Member

    Closing language service bugs related to the 6.0 implementation. For more information, see #62827

  3. locked as resolved and limited conversation to collaborators on Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.0 LS MigrationBugDomain: LS: Completion Lists

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions