swc-node icon indicating copy to clipboard operation
swc-node copied to clipboard

fix(register): support paths alias with baseUrl

Open terceser opened this issue 3 years ago • 1 comments

At the moment, swc-node raise an error if we defined paths in tsconfig.json

For example:

{
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
         "@api/*": ["api/*"]
     }
  }
}
Error: Cannot find module '../../../../../api/http-service

This pull request is to convert options.paths to absolute paths

terceser avatar Aug 03 '22 12:08 terceser

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 03 '22 12:08 CLAassistant

possible to get this merged pls?

joeledwardson avatar Sep 20 '22 09:09 joeledwardson