Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field

I have created an angular library and made a dist folder using ng build ${library-name} --prod

Now, I added bit to the project with the following commands:
(1) bit init
(2) bit import bit.envs/compilers/angular --compiler
(3) bit add dist/{lib-name} --main dist/{lib-name}/public-api.d.ts
(4) bit tag --all 1.0.0

Got an error:
Angular compiler option “flatModuleIndex” requires one and only one .ts file in the “files” field.

The project alone works just fine but when I add bit angular compiler to the project, this error keeps on coming. Did anyone face the same? Any help would be appreciated.