Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Package compiled EJS templates with RequireJS

$
0
0
A can-compile issue would have been helpful ;) I released a new version that should work again. Looks as if ZombieJS file URL parsing changed in Nodel 0.10 so I dropped it and use straight JSDom.

The problem is that the RequireJS optimizer expects your code compilation to be synchronous which is why it isn't built in require-ejs (yet). It doesn't make sense but that's the RequireJS plugin spec and JSDom only load asynchronously. Any ideas how to solve this are welcome.

However, the file created by can-compile just preloads all views, so require-ejs would just grab them from there. So you just have to include that generated file in your production configuration like any other non-AMD file.

Viewing all articles
Browse latest Browse all 3491

Trending Articles