Feature: Allow excluding from presets
Clear and concise description of the problem
I use the @vueuse/core preset. I have a useFileDialog function that comes from another library (with a preset).
Because @vueuse/core added useFileDialog recently, I now get this error:
[vite] [auto-import] identifier useFileDialog already defined with @vueuse/core
Suggested solution
Allow some exclusion syntax in the vite plugin like:
exclude: ["@vueuse/core", ["useFileDialog"]]
Alternative
If I could use this syntax:
'@vueuse/core': [
['useFetch', 'useMyFetch'], // import { useFetch as useMyFetch } from '@vueuse/core',
],
then I could just rename the one coming from @vueuse/core.
However, It's not preferable to do this because then I lose all of the other imports that the @vueuse/core preset adds automatically.
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
since you are using preset, it can be override. https://github.com/antfu/unplugin-auto-import/blob/main/src/types.ts#L121