javascript - RequireJS text plugin - minification of templates -


i'm using text plugin import templates. now, in production don't want there many xhr requests templates them in 1 go. idea have build task take template , create like:

define("my-template.tpl", function() {     return '<div>my content</div>' } 

and able , define statement has been run, requirejs still xhr request when have

define("my function", ["my-template.tpl"], function() {     <body of function here> }); 

did minification of text! plugin templates? doing wrong here?

requirejs requests modules asynchronously.

if want 1 single call, can build app using optimizer. not need template wrapper (as noticed yourself, won't change anything). files required using text plugin included in built file too.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -