I’m unfamiliar with Angular, but I ran into similar issues with path resolution in esbuild. To address this, I developed the xBuild package, which supports all esbuild configurations and some (ifdef, multi-build [esm, cjs ...]).
You can check out the project here:
GitHub: https://github.com/remotex-lab/xBuild
npm: https://www.npmjs.com/package/@remotex-labs/xbuild