angular / closure-demo

MIT License
114 stars 27 forks source link

Module resolution using paths property in tsconfig.json #8

Closed aitboudad closed 7 years ago

aitboudad commented 7 years ago

Hi, is there an example that use custom paths provided by typescript. right now I get the following error:

built/main.browser.js:2: ERROR - required "module$$app$app_module_ngfactory" namespace never provided
import { AppModuleNgFactory } from '@app/app.module.ngfactory';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Here is my tsconfig.json:

// tsconfig.json
{
  "compilerOptions": {
    "paths": {
        "@app/*": ["./app/*"],
    }
  }
}
aitboudad commented 7 years ago

solved by using custom script that convert paths into relative path.