TypeScript Version:
1.8.9
I am generating a library using the outDir option. The idea is mostly not to pollute my src dir.
But the issue is that i still want reference relative path to be relative as if the files where in src
The problem mostly happens with existing definition files in src
I think the problem is related to this one
let's say src is assets
and outDir is build/assets
my src :
test.d.ts
test.ts
test2.ts
test2.ts reference ./test.d.ts
my ouptut dir (build/assets) looks like this
test.js
test.js.map
test2.js
test2.js.map
test.d.ts
test2.d.ts
the problem appears in test2.d.ts and test2.js.map and test.js.map
in test2.d.ts it references ../../assets/test.d.ts when i want ./test.d.ts
in test2.js.map it references its sources ../../assets/test2.ts when i want test2.ts
same in test.js.map
I tried the option rootDir and set it to assets as i thought that was what it was for : to force all relative output path to be related to it. But it doesn't work.
Is there any way to do this? I need this because even if i build inside a different dir i still want to package it as if it was in the source dir.
TypeScript Version:
1.8.9
I am generating a library using the
outDiroption. The idea is mostly not to pollute mysrcdir.But the issue is that i still want reference relative path to be relative as if the files where in
srcThe problem mostly happens with existing definition files in
srcI think the problem is related to this one
let's say src is
assetsand
outDirisbuild/assetsmy src :
test2.tsreference./test.d.tsmy ouptut dir (
build/assets) looks like thisthe problem appears in
test2.d.tsandtest2.js.mapandtest.js.mapin
test2.d.tsit references../../assets/test.d.tswhen i want./test.d.tsin
test2.js.mapit references itssources../../assets/test2.tswhen i wanttest2.tssame in
test.js.mapI tried the option
rootDirand set it toassetsas i thought that was what it was for : to force all relative output path to be related to it. But it doesn't work.Is there any way to do this? I need this because even if i build inside a different dir i still want to package it as if it was in the source dir.