2

我正在使用糖语法将模板加载到我的视图中:

...
var template = require('text!templates/toolbar/toolbar.html')

一切正常,但是当我运行 r.js 优化器时出现错误

TypeError: Object function () {
        //A version of a require function that passes a moduleName
        //value for items that may need to
        //look up paths relative to the moduleName
        return req.apply(undef, aps.call(arguments, 0).concat([relName, forceSync]));
    } has no method 'toUrl'
4

0 回答 0