language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Image src with alias is not resolved correctly

Open galaxy-s10 opened this issue 2 years ago • 5 comments

in vscode,When using path aliases for the template and img src of the Vue file, cmd+click cannot jump to the corresponding path, but the import in the script can jump using path aliases.

galaxy-s10 avatar Aug 01 '23 08:08 galaxy-s10

image

image

galaxy-s10 avatar Aug 01 '23 08:08 galaxy-s10

The same problem in new version volar.

warmthsea avatar Oct 19 '23 10:10 warmthsea

Same problem, hope to fix.

ParkerFiend avatar Jan 01 '24 03:01 ParkerFiend

You can fix this by adding the following to you jsconfig/tsconfig.json file:

{
    "compilerOptions": {
        "paths": {
            "@/*": [
                "./src/*"
            ]
        }
    }
}

major-mayer avatar Jan 09 '24 10:01 major-mayer

Any updates? still have the same problem with Vue - Official v2.0.28

Tim-OuY avatar Aug 06 '24 02:08 Tim-OuY

It still remains unsolved till now and this problem still exists.

theores avatar Oct 29 '24 06:10 theores

The temporary solution is to just type "/src/..." and replace all of the "/src" with "@", that's it.

alphardex avatar Oct 29 '24 06:10 alphardex

any schedule?

lihxhit avatar Dec 31 '24 07:12 lihxhit

20250628

FE-runner avatar Jun 28 '25 04:06 FE-runner