Title: tsserver with `"module": "Preserve"` and `"moduleResolution": "Bundler"` adds .js extensions to imports · Issue #59200 · microsoft/TypeScript · GitHub
Open Graph Title: tsserver with `"module": "Preserve"` and `"moduleResolution": "Bundler"` adds .js extensions to imports · Issue #59200 · microsoft/TypeScript
X Title: tsserver with `"module": "Preserve"` and `"moduleResolution": "Bundler"` adds .js extensions to imports · Issue #59200 · microsoft/TypeScript
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/typesc...
Open Graph 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 L...
X 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 ⏯ Playgrou...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/59200
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tsserver with `\"module\": \"Preserve\"` and `\"moduleResolution\": \"Bundler\"` adds .js extensions to imports","articleBody":"### 🔎 Search Terms\n\nPreserve, Bundler, .js extension\n\n### 🕗 Version \u0026 Regression Information\n\n- This is the behavior in every version I tried, and I reviewed the FAQ for entries about completions\r\n\r\n\n\n### ⏯ Playground Link\n\nhttps://github.com/segevfiner/typescript-js-extension-issue\n\n### 💻 Code\n\nCompletion in the `\"./foo\"` in the lines below uncommented results in `./foo.js` despite using `\"moduleResolution\": \"Bundler\"`.\r\n```ts\r\n// import { FOO } from \"./foo\";\r\n// import { FOO } from \"./foo.js\";\r\n```\r\n\n\n### 🙁 Actual behavior\n\nIt completes to `./foo.js`\n\n### 🙂 Expected behavior\n\nIt should complete to `./foo` as we are in `\"moduleResolution\": \"Bundler\"` but `\"module\": \"Preserve\"` causes it to add the `js` extension.\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/segevfiner","@type":"Person","name":"segevfiner"},"datePublished":"2024-07-09T14:04:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/59200/TypeScript/issues/59200"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d61602d1-ea29-85f6-eb8d-b0ef3e1b2a69 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC50:7E22E:2CD5A:416B9:6A61CEEB |
| html-safe-nonce | b1923f15530f63dce2731ee5c98568e890b248258cbf8f738fb1ed1b6ade902e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzUwOjdFMjJFOjJDRDVBOjQxNkI5OjZBNjFDRUVCIiwidmlzaXRvcl9pZCI6IjI2MDQ4OTkzNjMzMjA4NzY3NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e6c967377ed6414f8296355d1134753cd0ff3a130e080f7f6348fce41641e69 |
| hovercard-subject-tag | issue:2398326222 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/59200/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d1f58f5a9f88f2ae1f0afd73ec1372de664ff568e2cff8b6f06b649ec8e83bad/microsoft/TypeScript/issues/59200 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d1f58f5a9f88f2ae1f0afd73ec1372de664ff568e2cff8b6f06b649ec8e83bad/microsoft/TypeScript/issues/59200 |
| og:image:alt | 🔎 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 L... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | segevfiner |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width