unplugin / unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup
MIT License
3.29k stars 198 forks source link

Can not auto import nested exports #236

Closed yjl9903 closed 2 years ago

yjl9903 commented 2 years ago

Describe the bug

Folder structure likes this:

image

The plugin can not analyze the exports of ./src/comps/nest/index.ts.

In the previous versions, it works fine. But after updating to v0.9.4, it broke something.

Reproduction

https://stackblitz.com/edit/vitejs-vite-ihjeci?file=auto-imports.d.ts

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /bin/yarn
    npm: 7.17.0 - /bin/npm

Used Package Manager

n/a

Validations

antfu commented 2 years ago

I have published 0.9.5 to revert the behavior change. And make 0.9.4 as 0.10.0 to be explicit.

https://github.com/antfu/unplugin-auto-import/releases/tag/v0.10.0