Tag: underscore.js templating

RequireJs r.js加载!tpl文件错误

我用uderscore和tpl使用requireJs,我把默认的文件从.html改为.tpl。 现在,如果我尝试优化我的应用程序,我得到了以下错误 Tracing dependencies for: app Error: Error: Loader plugin did not call the load callback in the build: tpl: tpl!module/home/template/home_unnormalized2 tpl!module/home/template/home /* more templates */ Module loading did not complete for: app, /* failed for all modules */ at Function.build.checkForErrors (/usr/local/lib/node_modules/requirejs/bin/r.js:28424:19) 似乎r.js无法处理.tpl或!tpl结尾/开头。 我的build立js ({ baseUrl: "js/lib", appDir: "..", dir: "dist", tpl: { extension: '.tpl' […]