Open miguel-leon opened 1 year ago
@miguel-leon can you provide us the console output when running with --debug?
It contained a lot of unnecessary information, because it wasn't a new empty project.
I took the path it is trying to locate ...dist/models/src/index.js
from that output, that's how I know.
Also there wasn't any signs of the models/tsconfig.json
being loaded to check up on the rootDir
.
I already moved on, so I don't have it anymore. I was letting you guys know in case you were interested.
This issue could probably be solved by changing
"models": ["../models/src/index.ts"]
to
"models": ["../models/src/index.ts", "../models/index.js"]
I think an update to rootDir's parsing is needed to fully resolve this issue here. Make it possible to parse the directory after the build.
This issue could probably be solved by changing
"models": ["../models/src/index.ts"]
to"models": ["../models/src/index.ts", "../models/index.js"]
This doesn't work.
In my main project
tsconfig.json
there is:being
models
a Project Reference, there's atsconfig.json
file in its directory:This means the output of tsc will be put directly in
../dist/models
skipping thesrc
subdirectory.When tsc-aliases runs, it is trying to locate the file
dist/models/src/index.js
, deems it invalid and doesn't replace the import. But it should have been looking indist/models/index.js
instead.