Changes between Initial Version and Version 1 of Ticket #12383


Ignore:
Timestamp:
Mar 5, 2011, 3:41:43 AM (11 years ago)
Author:
bill
Comment:

Seems like we should have done #2 in 1.6, but too late now. (Could be put into a 1.6.1, although it's not a critical bug fix.)

For 1.7, when we have a real AMD loader, seems like the best option is #3, to get rid of the dojo.cache() calls altogether.

In any case, assigning to kzyp since he's the one that added those duplicate references to begin with, in [23143]. Or was that a checkin on rcgill's behalf?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12383

    • Property Keywords rcgill added
    • Property Owner changed from anonymous to Kris Zyp
    • Property Component changed from General to Dijit
  • Ticket #12383 – Description

    initial v1  
    33Currently, dojo’s AMD definitions are defined with all the proper `text!` requirements for templates, but when building with a different AMD-compatible build system (like RequireJS), these required strings are never used and end up being needlessly re-requested by `dojo.cache`. There are a couple of potential ways of dealing with this that I can think of off the top of my head:
    44
    5 1. Update dojo.cache to try to retrieve text using `require('text!' + module + '/' + url)` before falling back to the normal loader.
    6 2. Update every templated widget to assign the text to a variable and then change templateString lines to `templateString: tmpl || dojo.cache(…)`.
     5  1. Update dojo.cache to try to retrieve text using `require('text!' + module + '/' + url)` before falling back to the normal loader.
     6  2. Update every templated widget to assign the text to a variable and then change templateString lines to `templateString: tmpl || dojo.cache(…)`.
    77
    8 Both work, #1 is obviously much quicker and easier and touches less stuff but assumes that the loader follows the optional part of the AMD specification regarding dependency scanning. I’ve confirmed that it does at least work with RequireJS; here’s a potential patch:
     8Both work, {{{#1}}} is obviously much quicker and easier and touches less stuff but assumes that the loader follows the optional part of the AMD specification regarding dependency scanning. I’ve confirmed that it does at least work with RequireJS; here’s a potential patch:
    99
    1010{{{