Home > Software engineering >  How to import as 'components/filename' instead of '../../../components/filename'
How to import as 'components/filename' instead of '../../../components/filename'

Time:10-29

I want to import my pages, components, and containers directly like 'components/filename' OR '@components/filename' instead of specifying the path to the parent folder like '../../components/filename'

How can I achieve that in React JS or Next JS with Typescript?

CodePudding user response:

i think you need to check the .jsconfig of your project, follow this article to learn about it : enter image description here

  • Related