Open NinjaInShade opened 1 year ago
sorry.
compilerOptions.outDir does not need to be .
, but it needed to be executed with tsc &&
tsc-alias.
~If you define a paths with isExtra: false
, it seems to cause an error if the compilerOptions.outDir
in tsconfig.json is anything other than .
~
~In my case, I wanted the outDir in tsconfig.json to be . /dist
, so I solved this problem by creating a new one for build.~
Doesn't transform alias if:
Let's say you have a directory structure like:
You also have an alias defined so that
~/
is resolved tosrc/*
. File B exports some constant File A imports that constant via~/folder_A/file_b
If you then run
tsc & tsc-alias
and the include in your tsconfig only include/s a file/s from only that folder_A, it doesn't transform the path correctly. Here's my debug output:server.ts in this case is importing a constant from test2.ts and I am only compiling those files. It seems to pick up on the import alias, but not actually transform it (see the last line).
Now, this obviously isn't a big deal since A) you should just use a relative import if the file is in the same directory and B) normally you will be compiling more than one directory, but it would be nice to see it get fixed