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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -