import foo from '/foo';
should import {sourceRoot}/foo
where sourceRoot is {pwd}/src
Is it possible to do this via tsconfig.json?
CodePudding user response:
Adding this to tsconfig should work:
"paths": {
"/*": [ "./src/*" ]
},
Based on this comment https://github.com/microsoft/TypeScript/issues/47646#issuecomment-1024456182
