I have an application which uses a lot of dust templates. IE8+ and other modern browsers such as Chrome there are no issues with client-side rendering but in IE7 and below this does not work properly.
Is there a way to run the dust.js in the server and return a compiled template?
You can do this with Node.JS...
npm install dustjs-linkedin
- (personally use the LinkedIn fork of dust)Obviously this is just an example, in a real script you would probably use some other mechanism, maybe Express. You would also use the 'fs' module to load the template from file.
On the client side request the compiled script from the server, your template will automatically be registered, so you can just do: