I'm using text plugin to import my templates. Now, in production I don't want that there are many XHR requests for templates so I would like to get them in one go. My idea was to have build task which would take template and create something like:
define("my-template.tpl", function() {
return '<div>my content</div>'
}
and I was able to do this and define statement has been run, but requirejs still does XHR request when I have
define("my function", ["my-template.tpl"], function() {
<body of function here>
});
Did someone do any minification of text! plugin templates? Am I doing something wrong here?