unplugin / unplugin-auto-import

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

Cannot exclude stories.ts file from auto import #484

Open drik98 opened 5 months ago

drik98 commented 5 months ago

Describe the bug

This describes the same problems as in https://github.com/unplugin/unplugin-auto-import/issues/407

Excluding files with a regex does not work. In my case I also want to exclude all stories files because they are only used for storybook and often times story names overlap.

I added a failing test case to highlight the problem in my fork.

Reproduction

https://github.com/drik98/unplugin-auto-import

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 75.55 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/Library/Caches/fnm_multishells/28829_1712732212332/bin/node
    npm: 10.2.3 - ~/Library/Caches/fnm_multishells/28829_1712732212332/bin/npm
    pnpm: 8.15.1 - ~/Library/Caches/fnm_multishells/28829_1712732212332/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.107
    Safari: 17.4.1

Used Package Manager

pnpm

Validations

chopperqt commented 4 months ago

I have the same problem :(