I can't use baseUrl and paths props of tsconfig.json to improve my imports statements.
I have this in my tsconfig file:
And I'm trying to import like this:
import DataTable from '@app/shared/components/DataTable/DataTable'
After reload I got this error message:
Failed to compile
Module not found: Can't resolve '@app/shared/components/DataTable/DataTable' in 'C:\Users\rafael.rodrigues\Documents\projects\SigISS_Front\src\app\modules\items\components'
I have the DataTable component in this path:
What must I do here to achieve this?
Your question is related to the
CRA, not to the Metronic itself, cause we haven't changed any base setup from CRA.
Anyway, here is some solutions for alliances in the app: https://plusreturn.com/blog/how-to-configure-a-path-alias-in-a-react-typescript-app-for-cleaner-imports/.