I followed the instruction but I think you should add the fact that in typescript project, it should be necessary to install @types/node to avoid type issues in vite.config.ts
Hello World! I am AB Siddik and also a passionate MernStack Developer for the last 2 years. I am curious to learn more about new things and Technologies. Free to work.
As you're not using TypeScript, you should create a file named jsconfig.json in the root folder of your app and put the config there, something like this:
Finally got it working. Thank you
Didn't work for me, this did: stackoverflow.com/questions/660436...
Great instructions! Thanks man.
Thank you so much, it was really helpful 😁🙌
Worked perfectly! Thanks for sharing! 😎
I followed the instruction but I think you should add the fact that in typescript project, it should be necessary to install @types/node to avoid type issues in vite.config.ts
Thanks a lot bro
After one whole day of testing many sets of configurations, finally you helped me, Thank you
I created an account just to say thank you
I am trying to do so but didn't worked. I am using JavaScript, instead of Typescript.
vite.config.json
and
package.json
Imported as
import Header from "@components/Header";Also, I had installed
@types/nodeas per the instructions.But still receiving this error
Please Help!
As you're not using TypeScript, you should create a file named jsconfig.json in the root folder of your app and put the config there, something like this:
{"compilerOptions": {
"baseUrl": ".",
"target": "es6",
"paths": {
"@/*": "src/*",
"@components/*": "src/components/*",
"@assets/*": "src/assets/*"
}
},
"exclude": ["node_modules"]
}
Thank you for the reply. I have figured out the solution here... stackoverflow.com/questions/777661...
Is there an option to use these alias in
pathparameter of a function? I would like to use in afs.readdirSyncto not enter the whole pathAmazing! Thanks for sharing!
Hi, do I need to install "path" package..? It doesn't come with a new react-typescript vite template.
If you're using Node as your runtime, you don't need to.
pathis one of Node's built-in modules.