Typecript and path aliases

Cant seem to get regular path aliases to work.
I can get it to compile, but it throws exception runtime.
Anybody got it working?

{
  "extends": "@tsconfig/node16/tsconfig.json",
  "compilerOptions": {
    "allowJs": true,
    "outDir": ".homeybuild/",
    "baseUrl": "./",
    "paths": {
      "xxx": ["xxx/yyy/*"]
    }
  }
}

This is a TypeScript compiler issue: it doesn’t replace the aliases (@xxx/module) with the correct path.

See this page and also this one.

Cant get it to work with homey as forces the output folder .homeybuild which module-alias is not happy about.

In that case, just don’t use path aliases :wink:

I guess you’re right, though it’s frustrating with undocumented “rules” in Homey and not being able to follow general best practice.

To be honest, I don’t think this is an (undocumented) rule, it’s the TypeScript compiler that’s causing the issue, and there are some modules that provide a workaround (that just doesn’t always work, but that’s not the fault of Athom/Homey).

Besides that, it’s probably possible to get it working for Homey, I just haven’t looked at it very closely.

No maybe not directly, but since changing the outDir or the compiler or even completely removing the build script has not effect, the options are some what limited.