-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto imports doesn't work in script setup template #470
Comments
UPDATEchanged export const _ = { ... } to export const $_ = { ... } and it worked. but can't figure out why |
Same issue |
Experiencing this issue too. |
I think _ is vue compiler's reserved variable or something like that |
I have issue with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note
Describe the bug
When using unplugin-auto-import in a Vite project to automatically import dependencies, the
_.isArray
function from a file(src/utils/lodash.ts)
is working correctly in the script context but fails in the template.The issue manifests as follows:
In the script section (<script setup>), _.isArray is correctly imported and works as expected.
In the template section (),
_.isArray
results in unexpected behavior, where the condition does not behave as expected.Folder Structure:
vite.config.ts
Reproduction
N/A
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: