You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm facing an issue with the auto-import.d.ts file when generating files with the suffixes as: foo.composable.ts or bar.helper.ts, etc.
The problem is that the file removes the suffix, which causes an "any" type for my files, specifically within the declare global {} block. I've tried investigating the issue on my own but can't seem to understand the problem. Below, I'll list what I have attempted.
Problem:
What solved my problem was changing this line in the unplugin/unimport library:
However, when I forked the unplugin/unimport repository to create a pull request, it broke all tests hahaha. So, the issue might not be related to this change, or it could be happening due to how I am using the library.
So, I forked the unplugin-auto-import repository and tried to reproduce my problem. Surprisingly, everything worked well in the playground folder.
Lastly, I created a project on StackBlitz and another on my computer using bun create vite, and both exhibited the same problem I'm facing in my project.
To reproduce the error, run rm auto-import.d.ts; npm run build
Observe how the file is generated: foo.composable.ts is written as foo instead of foo.composable within the declare global {} block.
Describe the bug
Hi, I'm facing an issue with the auto-import.d.ts file when generating files with the suffixes as:
foo.composable.ts
orbar.helper.ts
, etc.The problem is that the file removes the suffix, which causes an "any" type for my files, specifically within the
declare global {}
block. I've tried investigating the issue on my own but can't seem to understand the problem. Below, I'll list what I have attempted.Problem:
What solved my problem was changing this line in the
unplugin/unimport
library:However, when I forked the
unplugin/unimport
repository to create a pull request, it broke all tests hahaha. So, the issue might not be related to this change, or it could be happening due to how I am using the library.So, I forked the
unplugin-auto-import
repository and tried to reproduce my problem. Surprisingly, everything worked well in theplayground
folder.Lastly, I created a project on StackBlitz and another on my computer using
bun create vite
, and both exhibited the same problem I'm facing in my project.To reproduce the error, run
rm auto-import.d.ts; npm run build
Observe how the file is generated:
foo.composable.ts
is written asfoo
instead offoo.composable
within thedeclare global {}
block.Reproduction
https://stackblitz.com/edit/vue3-vite-starter-srm5lm
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: