If you try to generate d.ts files, they will still have invalid absolute paths. To fix that I created a (https://github.com/stavalfi/babel-plugin-module-resolver-loader) babel-plugin-module-resolver-loader (Webpack4+) that runs babel-plugin-module-resolver internally. You can safely run this, then ts-loader and then babel-loader to have valid d.ts files (using babel-plugin-module-resolver to transform every path to relative and then ts-loader to produce d.ts files) + babel-loader