unplugin / unplugin-auto-import

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

Plugin will try to inject other repo in monorepo #500

Open KawaiiZapic opened 4 months ago

KawaiiZapic commented 4 months ago

Describe the bug

From #499 , plugin will inject import statement out of current repo. For example, plugin try to inject "vue", If other repo that being injected does not install "vue" as its dep, will cause a build error.

In the reproduction, run pnpm build vite will exit with error, which should not happend because @example/api never configure to run with this plugin.

Reproduction

https://stackblitz.com/edit/vitejs-vite-kjoeqv?file=packages%2Ffe%2Fsrc%2Findex.js

System Info

Not provided

Used Package Manager

pnpm

Validations

stackblitz[bot] commented 4 months ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.