jsdefer icon indicating copy to clipboard operation
jsdefer copied to clipboard

Multiple script definitions with same url will choose last definition regardless of name.

Open wforney opened this issue 13 years ago • 1 comments

Multiple script definitions with same url will choose last definition regardless of name.

Example:

jQuery: {
    bare: true,
    url: aspnetcdn + "/jQuery/jquery-1.7.1.js",
    urlMin: aspnetcdn + "/jQuery/jquery-1.7.1.min.js",
    loaded: "!!window.jQuery"
},
jQuery171: {
    bare: true,
    url: aspnetcdn + "/jQuery/jquery-1.7.1.js",
    urlMin: aspnetcdn + "/jQuery/jquery-1.7.1.min.js",
   loaded: "window.checkjQueryVersion(171)"
},

defer call to jQuery will load jQuery171 definition script. This is not expected (loaded was different, causing test to fail in some cases, which was a bad thing)

wforney avatar Dec 19 '11 21:12 wforney

Yes, the way it is designed, the url is 'king', and the key is just a friendly alias for the URL. So you can't point different aliases to the same URL, other than as a replacement for the earlier alias. I agree the scenario of jQueryLatest is a nice one which is not supported in the current design... Need to consider this for a future version.

BorisMoore avatar Dec 19 '11 22:12 BorisMoore