I\'m enjoying emberjs a lot and would like to take the next step in a couple of my small, mobile apps and precompile my Ember/Handlebars templates as part of my build process.>
Found a good enough solution to my problem that seems easy enough to maintain that I'll consider my problem solved.
Here's how I solved things:
window.Handlebars = Handlebars;
and remove it.Ember.create
and change to Object.create
.var Ember = require('./my_ember_precompiler').Ember
.var templateString = Ember.Handlebars.precompile(str).toString()
.Handlebars.template()
and make sure this wrapped function is added to the Ember.TEMPLATES
object.The above is painless when it's automated in a script.