# C8ycli option for optimized production build

**URL:** <https://community.cumulocity.com/t/c8ycli-option-for-optimized-production-build/7076>\
**Category:** Forum\
**Tags:** c8ycli, cumulocity\
**Created:** [July 14, 2023, 10:02am UTC](https://community.cumulocity.com/t/c8ycli-option-for-optimized-production-build/7076 "2023-07-14T10:02:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Winter1](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@Christian\_Winter1](https://community.cumulocity.com/u/Christian_Winter1)\
**Post date:** [July 14, 2023, 10:02am UTC](https://community.cumulocity.com/t/c8ycli-option-for-optimized-production-build/7076/1 "2023-07-14T10:02:02Z")

</div>

#### _ **Product/components** used and **version/fix** level:_

`c8ycli` for building custom applications for the Cumulocity IoT platform. I’m using version 10.16, but I guess, the version is not important here.

#### _Detailed explanation of the problem:_

I want to build a custom application with `c8ycli`. Running c8ycli build just works fine.

However, I’m wondering how to optimize the build for production usage (deployment to Cumulocity IoT platform). The documentation of `c8ycli` mentions the option `‑‑env.mode="production"`. Thus I’ve tried c8ycli build --env.mode="production". But this alone doesn’t seem to have any effect on the resulting build.

Being more familiar with Angular, I know Angular’s option `--configuration production` (just `-prod` in earlier versions of Angular). This option combined with typical settings in `angular.json` produces an optimized build that is significantly smaller than a build without this option. Can we achieve something similar with `c8ycli`?

---

<div class="post-metadata">

**Author:** ![Tristan\_Bastian](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/tristan_bastian/32/18259_2.png) [@Tristan\_Bastian](https://community.cumulocity.com/u/Tristan_Bastian)\
**Post date:** [July 14, 2023, 10:23am UTC](https://community.cumulocity.com/t/c8ycli-option-for-optimized-production-build/7076/2 "2023-07-14T10:23:11Z")

</div>

Hi Christian,

for the `c8ycli build` command the default mode is production while for `c8ycli server` it is development.  
Running `c8ycli build --env.mode="production"` does not actually have any effect as it is by default already in that mode.

In case you want to have a production build during local development you can run `c8ycli server --env.mode="production"`.  
Or for a development build that you want to deploy to your tenant, you can run `c8ycli build --env.mode="development"`.

Note that the `development` builds are significantly larger compared to the production ones.

Regards,  
Tristan

---

<div class="post-metadata">

**Author:** ![Christian\_Winter1](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@Christian\_Winter1](https://community.cumulocity.com/u/Christian_Winter1)\
**Post date:** [July 14, 2023, 11:28am UTC](https://community.cumulocity.com/t/c8ycli-option-for-optimized-production-build/7076/3 "2023-07-14T11:28:35Z")

</div>

Hi Tristan,  
thank you for the quick and clear answer!  
Best regards,  
Christian

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [January 10, 2024, 11:29am UTC](https://community.cumulocity.com/t/c8ycli-option-for-optimized-production-build/7076/4 "2024-01-10T11:29:30Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
