unplugin-auto-import
unplugin-auto-import copied to clipboard
unplugin-auto-import generate two directories with autoimported types
Describe the bug
I have this setup
repo
When I starting VS Code after dependencies installed, it create directory with autoimported types right in the root of the project
but when i run the project
i got another autoimported types in the directory src/types
And for some reason autoimport for createRouter from vue-router happened in the types/auto-import.d.ts, not in the src/type
s/autoimport.d.ts, so I should import createRouter manually from 'vue-router'.
My setup is intended auto imported types to be in src/types, not in types in the root of the project.
Is it a bug or I have something wrong with my setup/ VS Code settings/extensions?
Reproduction
get the repo provided, open it in VS Code, install deps with pnpm i, then restart VS Code - you will see types dir in the root of the project, then run pnpm dev and you will see autoimported types in src/types folder too
System Info
System:
OS: Windows 10 10.0.19045
CPU: (20) x64 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Memory: 46.30 GB / 63.93 GB
Binaries:
Node: 20.8.0 - ~\AppData\Local\pnpm\node.EXE
npm: 10.1.0 - ~\AppData\Local\pnpm\npm.CMD
pnpm: 8.9.2 - ~\AppData\Local\pnpm\pnpm.EXE
Used Package Manager
pnpm
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.
its works for me, try delete root/types and restart your project