Replies: 1 comment
-
First of all these are very good and effective suggestion, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems there is a fundamental problem with import path solving in Volar. I keep seeing import path issues fixes in release notes, yet new import path bugs keep on surfacing.
The back and forth between
import * as path from 'path'
andimport { posix as path } from 'path'
suggests that there is not a clear understanding of what the actual problem or solution is.Unfortunately I have never worked with either Node or VS Code extensions, so I don't know either.
Some suggestion though to fix this once and for all:
./util.ts
@/util.ts
util.ts
,/util.ts
node_module
importsimport { ref } from "vue"
tsconfig.json
configurations -"baseUrl": "."
,"baseUrl": "src"
typescript.tsdk
is used:"typescript.tsdk": "./crm/client/node_modules/typescript/lib"
,Centralize all path solving through a single path solving function, to avoid requiring changes in so many places when something must be fixed. The function probably needs a
resolutionMethod
kind of argument - use TypeScript/Vue resolution vs use generic path resolution (for CSS? not sure)Look at what other extension are doing (Vetur/React/...), maybe there is a standard solution to this problem
Beta Was this translation helpful? Give feedback.
All reactions