Requirejs + text plugin + sugar syntax + almond.js

550 Views Asked by At

I'm using the sugar syntax to load templates into my views:

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

Everything works fine, but when I run the r.js optimizer I get the error

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'
0

There are 0 best solutions below