Trouble using Angular 6 libraries with shared codebase


#1

Hello,

I just migrated an Angular app to a shared codebase with Nativescript with the new schematics and everything seemed to be working fine, but somehow Nativescript is unable to resolve the paths for our Angular libraries (we created them via angular-cli, a recently added feature).

The paths are properly defined in the tsconfig.json and they are recognised when serving Angular but I can’t make them work with NativeScript:

      "paths": {
        "@scope/library-name": [
          "dist/scope/library-name"
        ],
        "@scope/library-name/*": [
          "dist/scope/library-name/*"
        ],

Module not found: Error: Can't resolve '@scope/library-name' in ...

VSCode/Typescript doesn’t seem to complain with the imports and actually, if I hover, they are pointing to the right directory. Is there something I am missing?

Thank you very much in advance.