After using dojo has been tangled JS file content has updated how to load, these two days finally solved the problem, originally want to add a library file instead of dojo corresponding function, but found that the dojo library apparitions too tight, on the original file changed.
Load in two cases one dojo.text! load or no code execution, and the other is loaded as a library, and the two are handled separately.
The first is to add the version number "? V=xxx" directly after the loaded URL.
Tourl = Req.tourl = function (name, referencemodule) {var moduleinfo = GetModuleInfo (name+ "x", Referencemodule), url= Moduleinfo.url; Url=url.substring (0, url.length-5) if (req.version) { URL + = "?" +req.version; name+= "?" +req.version; } Return Fixupurl (moduleinfo.pid===0//If pid===0, then name had a protocol or absolute path; either to, Tourl is the IDE ntify function in such casesname://"/x.js" since GetModuleInfo automatically appends ". js" and we appended "/X" to make Name look like a module idurl//url.substring (0, url.length-5));
The other is to add the version number "? V=xxx" when loading the library file.
Compactpath = function (path) { var p=path;var result = [],segment, Lastsegment;path = Path.replace (/\\/g, '/'). Split ( '/'); while (path.length) {segment = Path.shift (); if (segment== ":" && result.length && lastsegment!= "...") {Result.pop (); lastsegment = Result[result.length-1];} else if (segment!= ".") {Result.push (lastsegment= segment);} else ignore "."} var url=result.join ("/"); if (P.indexof ('/x.js ') ==-1 && req.version && p.indexof ('. js ')!=-1) { url+= "?" +req.version; Console.log (' Compactpath result: ', path,result); } return URL;},
Add the Version property to the Require library when you use it.
require.version= ' v0.1 ';