gutter-preview
gutter-preview copied to clipboard
mapping paths and alias
first, replace "@" with "$" second, use "$xxx"
for example
"gutterpreview.paths": {
"$src": "${workspaceFolder}/src"
},
then,you can use the alias for html
<img src="src/assets/logo.png" alt="" />
<img src="$src/assets/logo.png" alt="" />
but how can I use the alias with "@"? It don't work :(
Are you windows system? If yes, #138 may be able to help you. I released an interim version, you can try this. then setting.json
"gutterpreview.paths": {
"@": "./src"
},
or tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
Are you windows system? If yes, #138 may be able to help you. I released an interim version, you can try this. then setting.json
"gutterpreview.paths": { "@": "./src" },
or tsconfig.json
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } } }
jsconfig.json
is unsuccessful, but tsconfig.json
is succeed
'gutterpreview.paths' can also
Are you windows system? If yes, #138 may be able to help you. I released an interim version, you can try this. then setting.json
"gutterpreview.paths": { "@": "./src" },
or tsconfig.json
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } } }
It's useful, thank you! But it don‘t work by start with '/@/', and vben's alias is start with '/@/', could you resolve this problem? please~
Are you windows system? If yes, #138 may be able to help you. I released an interim version, you can try this. then setting.json
"gutterpreview.paths": { "@": "./src" },
or tsconfig.json
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } } }
thanks,it works for me.
"@": "./src"
"gutterpreview.paths": {
"@": "./src"
},
It doesn't work