can someone pls explain to me why i still getting error when i'm using
import SomeComponent from '@baseComponents/SomeComponent';
this is my error Unable to resolve path to module '@baseComponents/SomeComponent'
this is part of my esLint
"settings": { "import/resolver": { "alias": { "map": [["@", "./src"], ["@baseComponents", "./src/components/Base/*"]], "extensions": [".ts", ".tsx", ".js", ".jsx", ".json"] }, } }
and this is part of my craco.config
webpack: { alias: { '@convertor': path.resolve(__dirname, `src/convertors`), '@baseComponents': path.resolve(__dirname, `src/components/Base`), }, }, jest: { configure: { moduleNameMapper: { '^@baseComponents(.*)$': '<rootDir>/src/components/Base', }, }, },
this is tsconfig.paths.json
{ "compilerOptions": { "baseUrl": "src", "paths": { "@baseComponents/*": [ "src/components/Base/*" ], "@convertor/*": [ "src/convertors/*" ], } } }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
can someone pls explain to me why i still getting error when i'm using
import SomeComponent from '@baseComponents/SomeComponent';
this is part of my esLint
and this is part of my craco.config
this is tsconfig.paths.json