Hacker News new | ask | show | jobs
by tg3 4837 days ago
If you added a build process that actually pulled in the source files for a bundled production file you might have something similar to RequireJS for templates.

Cool stuff.

1 comments

Doesn't require.js include plugins that will pull in compiled templates for you for the major templating libraries already? (underscore, mustache etc)?
Yes it does. This one precompiles handlebars for you: https://github.com/SlexAxton/require-handlebars-plugin
That's pretty sweet. So if you run the r.js optimizer, you'll be serving minified, precompiled templates to the client.
Indeed. We use it all the time!