I use tsconfig's `paths` in combination with the `require-rewrite` npm module (https://github.com/IUnknown68/require-rewrite).
Here's an example:
// tsconfig.json
...
"paths": {
"#src/*": ["src/*"],
}
...
// package.json
...
"requireRewrite": {
"map": [
[
"#src/",
"dist/src/"
],
]
}
...
// src/path1/x.ts
import { X } from '#src/path2/y.ts`