When we generate a lib for scoped package using tsb. The metadata.json changes flatModuleID to safe-package name rather than actual package-name. This cause AoT to not find the module.
ERROR in ./apps/app/src/app/app.module.ngfactory.js
Module not found: Error: Can’t resolve ‘mycompany-auth’ in ‘/Users/system/projects/ngseed/apps/app/src/app’
@ ./apps/app/src/app/app.module.ngfactory.js 23:10-32
@ ./apps/app/src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./apps/app/src/main.ts
However when we updated tsconfig.json to pass flatModuleID same as package-name then error disappears
When we generate a lib for scoped package using tsb. The metadata.json changes flatModuleID to safe-package name rather than actual package-name. This cause AoT to not find the module.
However when we updated tsconfig.json to pass flatModuleID same as package-name then error disappears
Here is snippet of metadata.json (before change)
Here is snippet of metadata.json after changes
I think we need a change here https://github.com/aminpaks/typescript-library-bundler/blob/master/src/config-helpers.ts#L71 We should pass raw module id to https://github.com/aminpaks/typescript-library-bundler/blob/master/src/config-helpers.ts#L47 and convert to safe-id for usage at this place https://github.com/aminpaks/typescript-library-bundler/blob/master/src/config-helpers.ts#L60
I can create a PR for the change if required