"@" alias is not working
Answered
Bull Arab posted this in #help-forum
Bull ArabOP
my
i tried changing it but it's not working
jsconfig.json{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}i tried changing it but it's not working
Answered by joulev
do you use typescript in the project? if not, remove tsconfig.json. it is overwriting your jsconfig.json.
21 Replies
Bull ArabOP
please someone fix this
@Bull Arab my `jsconfig.json`
json
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
i tried changing it but it's not working
add
"baseUrl": "." to the compilerOptions objectBull ArabOP
this is my terminal throwing the error
this is how i imported
this is my dir structure
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["./src/*"]
}
}
}this is my json ( i updates as you mentioned ) @joulev
@Bull Arab this is my json ( i updates as you mentioned ) <@484037068239142956>
where is your jsconfig.json located?
Bull ArabOP
root
./
screenshot of your entire project directory structure?
Bull ArabOP
yes
here you go
@Bull Arab Click to see attachment
do you use typescript in the project? if not, remove tsconfig.json. it is overwriting your jsconfig.json.
Answer
Bull ArabOP
worked 😭
thank you
also... i'll be use ts, soon, will this cause issue again?
@joulev
if you use typescript you'll have to replicate the content of
compilerOptions in jsconfig.json to the compilerOptions in tsconfig.json too