I have set up jsconfig.json as described in cra documentation. [https://create-react-app.dev/docs/importing-a-component#absolute-imports][1]
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
It is working fine if write directly to the file.
import Test from 'pages/Test'
But when I try to load it lazy, it is creating problem.
const TestPage= React.lazy(() => import('pages/Test'));
Doing this giving error cannot able to find module: pages/Test
But if I write relative path, it is working fine.
const TestPage= React.lazy(() => import('../../pages/Test'));
So, my question is how to import module on dynamically by using absolute path?
Thanks