Open Philipp15b opened 12 years ago
Yes, would be nice to prevent it, maybe something like
eco = require 'eco'
bundle = [
eco.head()
eco.precompileWithoutHead(tmpl1)
eco.precompileWithoutHead(tmpl2)
....
].join("; \n")
+1 for this optimization! We just noticed this duplication as well, and were immediately looking for a way to cut it out, but got lost in the details of why it is there in the first place.
Any news for this? At least is this feature will be accepted or rejected?
So I wanted to use eco client-side and I noticed that eco pre-compiles all the helper functions in every single one of the compiled templates.
This could be solved by maybe allowing the compiler to use a global eco object which would then contain the helpers.
This was also mentioned in #48.