RequireJs r.js load!tpl文件错误

时间:2015-05-28 09:24:57

标签: javascript node.js underscore.js r.js underscore.js-templating

我正在使用带有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结尾/开头。

我的构建js

({
    baseUrl: "js/lib",
    appDir: "..",
    dir: "dist",

    tpl: {
        extension: '.tpl' // default = '.html'
    },

    modules: [
        { name: "app" }
    ],

    paths: {
        app: '../app',
        underscore: 'underscore',
        text: 'text',
        tpl: 'tpl',

        //Module
        home : '../module/home/home',
    },

    shim : {

    }
})

0 个答案:

没有答案