unplugin-auto-import icon indicating copy to clipboard operation
unplugin-auto-import copied to clipboard

Cannot auto import types

Open thehrz opened this issue 1 year ago • 3 comments

Describe the bug

Cannot auto import types added to the dirs config.

This seems to be because includeTypes is set to false when calling scanExports.

https://github.com/unplugin/unplugin-auto-import/blob/128d050107af1b57ffe2fe2b32018e4110042bde/src/core/ctx.ts#L33

Reproduction

https://stackblitz.com/edit/typeserror?file=src%2Fmain.ts

System Info

System:
  OS: Linux 6.7 Arch Linux
  CPU: (16) x64 13th Gen Intel(R) Core(TM) i5-13400F
  Memory: 49.13 GB / 62.64 GB
  Container: Yes
  Shell: 5.9 - /usr/bin/zsh
Binaries:
  Node: 18.18.2 - /usr/bin/node
  npm: 10.4.0 - /usr/bin/npm
Browsers:
  Chromium: 121.0.6167.160

Used Package Manager

npm

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [X] The provided reproduction is a minimal reproducible of the bug.

thehrz avatar Feb 19 '24 10:02 thehrz

See also #61

tryforceful avatar Mar 26 '24 16:03 tryforceful