Opened 10 years ago
Last modified 10 years ago
#14972 closed defect
[regression] Concatenated built layers load dependencies too aggressively in legacy mode ā at Version 1
Reported by: | Colin Snover | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.7.3 |
Component: | Loader | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Iām trying to create a concatenation of built layers that uses flattened NLS bundles. Unfortunately, it seems that there are at least two places in the loader where dependencies are preemptively requested in response to define
calls, which means that, though the chain of dependencies, these files are required *in addition to* their constituent files. The locations in the 1.7 branch corresponding to this problem appear to be:
- dojo.js:1466 @if(has("dojo-sync-loader") && legacyMode && !waiting[mid]){@
- dojo.js:1667 @if(targetModule && !waiting[targetModule.mid]){@
Steps to reproduce:
- Create standard build (w/ noref flag).
- Create a PHP script like this within the release @[email protected] directory for the build:
<?php header('Content-Type: text/javascript'); readfile('dojo.js.uncompressed.js'); readfile('../dijit/dijit.js.uncompressed.js'); readfile('../dijit/dijit-all.js.uncompressed.js'); readfile('../dojox/grid/DataGrid.js.uncompressed.js');
- Create a valid, blank page containing only this script:
<script data-dojo-config="locale: 'en-us', baseUrl: '//cross-domain/path/to/dojo'" src="//cross-domain/path/to/dojo/concat.php?/dojo.js"></script>
Expected: concat.php and dijit-all_en-us.js load. Actual: those scripts plus 8 additional scripts load.
Note: See
TracTickets for help on using
tickets.