I have created a library that has modules that have components in them.
My library public_api.ts has this:
export * from \'./src/app/modules/my-mod-1/my-
I got some help from here: https://github.com/angular/angular-cli/issues/11394
It appears that:
1) you should export all components and modules used by the library in the public_api.ts
file.
2) apparently deleting the node_modules
folder and then re-installing it by npm install
seems to work, it appears that the library cached files were corrupt
Now my app works in production as well!