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

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

Open
segevfiner opened this issue Jul 9, 2024 · 0 comments
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@segevfiner
Copy link

πŸ”Ž 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

2 participants