tbranyen / combyne

A template engine that works the way you expect.
MIT License
144 stars 19 forks source link

combyne (-amd-loader?) not working properly after rjs build #64

Closed chikamichi closed 9 years ago

chikamichi commented 9 years ago

Hi,

I'm facing a weird issue. I use requirejs' optimizer to generate a production-ready build, and using combyne-loader (as "tpl" in my requirejs paths), it fails at properly loading the templates.

Runs perfectly fine with the separated scripts ("tpl!some/template" returns a Combyne object), but once I generate the build, it rather returns an object, with registerFilter and registerPartial properties instead of the expected compiler, data, etc. I guess this is the inlined version of the template, but well, it breaks the rendering :)

chikamichi commented 9 years ago

After further inspection, this could be related to the framework I'm using (Backbone.Giraffe).

Edit: I was poking for @template.compiler to check whether I could render a template (don't ask me why), but once the templates have been inlined, they obviously do not have this property anymore! Problem fixed.