テンプレートをビューにロードするために、sugar 構文を使用しています。
...
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'