Open ethanjdiamond opened 5 days ago
Does this issue occur when all extensions are disabled?: Yes
I have these settings in VSCode:
{ "javascript.preferences.importModuleSpecifierEnding": "minimal", "typescript.preferences.importModuleSpecifierEnding": "minimal" }
I have these setting in my package.json:
"imports": { "#src": ["./src/index.ts", "./src/index/tsx"], "#src/*": [ "./src/*", "./src/*.ts", "./src/*.tsx", "./src/*/index.ts", "./src/*/index.tsx" ] },
I have these settings in my tsconfig.json
"target": "esnext", "module": "esnext", "moduleResolution": "bundler",
However, when I auto-import something that starts with #src/, it automatically appends a .js to the import (or a .ts if I have allowImportingTsExtensions on. This is ignoring my settings to use the minimum module specifier ending I set in VSCode.
#src/
.js
.ts
allowImportingTsExtensions
It looks like the addition of the .ts functionality was added in this bugfix: https://github.com/microsoft/TypeScript/issues/52167. I'm not sure why it wasn't set to respect the vscode settings.
We need a repo we can clone here to try this out; there are multiple other variables in play that need to be checked first
Does this issue occur when all extensions are disabled?: Yes
I have these settings in VSCode:
I have these setting in my package.json:
I have these settings in my tsconfig.json
However, when I auto-import something that starts with
#src/
, it automatically appends a.js
to the import (or a.ts
if I haveallowImportingTsExtensions
on. This is ignoring my settings to use the minimum module specifier ending I set in VSCode.It looks like the addition of the
.ts
functionality was added in this bugfix: https://github.com/microsoft/TypeScript/issues/52167. I'm not sure why it wasn't set to respect the vscode settings.