Description
🔎 Search Terms
package.json imports, package.json imports intellisense, package.json imports autocomplete, package.json import suggestions
🕗 Version & Regression Information
This feature released with v5.4 yesterday so not too much bisection to be done. 😄
⏯ Playground Link
https://github.com/anthonyshew/packagejson-imports-typescript-suggestions
💻 Code
I apologize for not following the standards of the template to provide a TypeScript playground. I couldn't find a way to work with imports or a package.json there. If that is possible and I missed it, please let me know so I can update appropriately.
Reproduction repository: https://github.com/anthonyshew/packagejson-imports-typescript-suggestions
package.json#import: https://github.com/anthonyshew/packagejson-imports-typescript-suggestions/blob/b33225588c9ca061807f8c1cb55c50dff66ef581/package.json#L6
Attempted inference: https://github.com/anthonyshew/packagejson-imports-typescript-suggestions/blob/b33225588c9ca061807f8c1cb55c50dff66ef581/app/page.tsx#L1
🙁 Actual behavior
With your cursor on the path string for the import on line 1 of ./app/page.tsx
, opening suggestions does not provide autocomplete.
🙂 Expected behavior
I was hoping to see a suggestion for #components/TestComponent.tsx
. Notably, if I write it out fully myself, my editor is happy and my build compiles/bundles successfully so I'm relatively certain that I am set up correctly.
Additional information about the issue
I did some light futzing with the "allowImportingTsExtensions"
and "verbatimModuleSyntax"
compiler options in my tsconfig.json
and was noticing some un-aligned behavior. I'm not sure if this is deserving of another bug report or is related.
As an example, auto-importing seems to use verbatimModuleSyntax
(or something like it) even when I don't have that flag enabled. Again, not certain if related.