I create a library by command('ng generate library my-library').
use 'ng build my-library' and work successful.
but use 'ng build my-library --prod --aot', not work.
please help me.
The ng build command with the --prod meta-flag (ng build --prod) compiles with AOT by default.
Refer: Doc
Angular CLI no longer creates a production for libraries, as there is a single ng-packagr configuration. Since previously two different confiurations were dist folder was kept for none --prod builds.
Unless you create a production configuration you shouldn't be needing --prod for libraries.
Libraries get only build in AOT mode, thus 鈥攁ot is not available.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Angular CLI no longer creates a production for libraries, as there is a single ng-packagr configuration. Since previously two different confiurations were dist folder was kept for none
--prodbuilds.Unless you create a production configuration you shouldn't be needing
--prodfor libraries.Libraries get only build in AOT mode, thus
鈥攁otis not available.