On compile i get error that i can't fix :/
index.ts:2:19 - error TS2307: Cannot find module '@shared'
Any ideas why is it?
Project structure:
tsconfig.json:
{
"compilerOptions": {
"outDir": "../../build/backend",
},
"extends": "../../configs/tsconfig.base.json",
"references": [
{
"path": "../shared"
}
],
"paths": {
"@shared": [
"../shared/index"
]
}
}
backend/index.ts:
import 'module-alias/register'
import { x } from '@shared'
console.log(x)
shared/index.ts:
export const x = 'this is shared index'