Here's the Github MCVE showing an issue. npm run compile
shows the error.
I'm trying to do this:
import {Todo} from '@test';
But it's not resolving.
src/index.ts:1:20 - error TS2307: Cannot find module '@test'.
I have paths
in tsconfig.json
.
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"paths": {
"@fs/": ["src/"],
"@test/": ["test/"]
}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
Thoughts?
Github Typescript Issue
I opened a bug report for this here since per some of the comments it should have worked.
Typescript note that I updated the github repository removing the glob patterns and slashes in @test
.