# How do I precompile templates?

**URL:** <https://discuss.emberjs.com/t/how-do-i-precompile-templates/6913>\
**Category:** Uncategorized\
**Created:** [December 14, 2014, 11:17am UTC](https://discuss.emberjs.com/t/how-do-i-precompile-templates/6913 "2014-12-14T11:17:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tehmaestro](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/tehmaestro/32/16862_2.png) [@tehmaestro](https://discuss.emberjs.com/u/tehmaestro)\
**Post date:** [December 14, 2014, 11:17am UTC](https://discuss.emberjs.com/t/how-do-i-precompile-templates/6913/1 "2014-12-14T11:17:52Z")

</div>

Hello. I’ve got an Ember app that’s about 700 Kb in production environment. What I don’t understand is, is it already using precompiled templates? Or can I further decrease the size by using a precompiler?

I’ve got Ember Cli 0.1.3, Ember 1.9.0 and I have installed ember-cli-htmlbars, handblebars#2.0.0 and broccoli-emblem-compiler, from here [https://github.com/antramm/broccoli-emblem-compiler](https://github.com/antramm/broccoli-emblem-compiler)

So, are my templates precompiled? Or do I need to add something in Brocfile, to use the emblem compiler? I’m a bit confused, and an example would be awesome.

Are there any other strategies for decreasing the size of an Ember App built with CLI? Thank you.

---

<div class="post-metadata">

**Author:** ![sivakumar\_k](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/sivakumar_k/32/13647_2.png) [@sivakumar\_k](https://discuss.emberjs.com/u/sivakumar_k)\
**Post date:** [December 14, 2014, 7:57pm UTC](https://discuss.emberjs.com/t/how-do-i-precompile-templates/6913/2 "2014-12-14T19:57:40Z")

</div>

If you don’t have [uglify-js](https://github.com/joliss/broccoli-uglify-js) plugin installed add it to your project(doesn’t come by default with ember-cli). That should definitely bring down the size of your generated files.

---

<div class="post-metadata">

**Author:** ![toranb](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/toranb/32/16579_2.png) [@toranb](https://discuss.emberjs.com/u/toranb)\
**Post date:** [December 15, 2014, 3:51am UTC](https://discuss.emberjs.com/t/how-do-i-precompile-templates/6913/3 "2014-12-15T03:51:07Z")

</div>

If you open the project-name.js file you should see your templates are represented as javascript functions. If you do indeed see this -you are using precompiled templates. I’m using ember-cli 0.1.3 and 0.1.4 and both seem to function as if I was doing a precompile myself w/ grunt or gulp
