Skip to content
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

When there are a lot of ts files in the project, vue official will still use vue3's v-for syntax rule (vue33) to detect vue2 code. #4292

Closed
curlykay opened this issue Apr 23, 2024 · 2 comments · Fixed by #4603
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@curlykay
Copy link

Sorry to bother you again, still a continuation of question #3959, #4242.

After the commit: 32b7c72 merge, it did resolve #4242 issue in projects with few ts files, but my project has tons of ts files.
In this repo: https://github.com/curlykay/vue2-volar, I added "node_modules/**/*.ts" to the "include" in tsconfig and removed the "exclude" to simulate a project with a lot of ts files(Note: This is just for simulating projects with lots of ts files, my real projects have normal tsconfig configurations!--even so the loading time for initializing the ts/js service for my real project is still longer than that repo😅).
image

Then both "Developer: Reload Window" and "Vue: Restart Vue and TS servers" will trigger this error

2024-04-23.18.49.45.mov
2024-04-23.18.50.31.mov

env:
os: macos 14.4.1
vscode: 1.88.1
Vue Official: 2.0.14
vue: 2.7.16
typescript: 5.4.4
tsconfig.vueCompilerOptions.target: 2.7

The repo provides a vsocde code-profile file, which can be imported to get a clean plugin configuration.

@curlykay
Copy link
Author

This issue was fixed in version 2.0.16, but it reappeared in versions 2.0.17 and above.
This repo is still available: https://github.com/curlykay/vue2-volar, and the issue can be reproduced by changing the version of the vue official plugin.

@curlykay curlykay changed the title When there are a lot of ts files in the project, vue official still has problems detecting vue2 code using vue3 rules When there are a lot of ts files in the project, vue official will still use vue3's v-for syntax rule (vue33) to detect vue2 code. Jun 11, 2024
@johnsoncodehk johnsoncodehk added the bug Something isn't working label Jul 18, 2024
@johnsoncodehk johnsoncodehk added the good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first label Jul 18, 2024
@johnsoncodehk
Copy link
Member

The problem should be fixed in the latest commit, if you want to test, here is the installation package: volar-2.0.26-e6c431ce7.vsix.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants