I'm currently faced with an issue while working on a typescript module within a larger monorepo. I am having difficulty importing types from one package into another via node modules. The types are located at ./types
, and my package.json contains a key types: types/index.d.ts
. Despite this setup, I am unable to successfully import the types into another module during local development.
It seems like everything should just seamlessly work, with npm/typescript resolving these dependencies appropriately.
This is how my tsconfig file is configured:
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./src",
"rootDir": "./src",
"outDir": "./dist",
"declaration": true,
"declarationDir": "./types"
},
"include": [
"./src"
],
"exclude": [
"node_modules",
"dist"
]
}