In my project, I have multiple lambdas that utilize a lambda layer. The structure of the project is organized as follows:
lambdas/
create/
index.ts
delete/
index.ts
layer/
nodejs/
node_modules
I want to ensure that each TypeScript file compiles using the directory path: layer/nodejs/node_modules.
I attempted to achieve this by using the following configurations in my tsconfig file:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*" : ["../utility_layer_1/nodejs"]
}
}
}
and also tried:
{
"compilerOptions": {
"baseUrl": "../utility_layer_1/nodejs",
"paths": {
"*" : ["."]
}
}
}
However, despite setting the base paths, it seems that I am unable to make it function as intended.
I initially believed that utilizing base paths would allow me to read from a different directory, but it seems this is not working as expected.