NextJS import location styling?

15 views Asked by At

I have already a project which has a file that is importing following function

import theme from 'src/configs/theme'

But when i created new nextjs project and created same folder structure and imported same function it is saying module not found, it works if i change it to

import theme from '../../configs/theme', is there any thing i m missing? The above one looks more clean and clear

1

There are 1 answers

0
SWIK On

Just found the answer, i had to just add

"baseUrl": ".",

in compilerOption of tsconfig.json file