Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14030 closed defect (fixed)

modules included in the dojo.js layer are not properly consumed

Reported by: ben hockey Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: Loader Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

to reduce http requests, i'm trying to build some modules into dojo.js.

these files don't seem to be consumed from the require cache as i would expect.

to see this, extract the attached zip file as a sibling of dojo, dijit, dojox. build using the included profile. load packageMap.html from the built version, you'll see requests for modules that were built into dojo.js

Attachments (1)

loader.zip (1.3 KB) - added by ben hockey 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by ben hockey

Attachment: loader.zip added

comment:1 Changed 8 years ago by ben hockey

also, if you inspect dojo.js.uncompressed.js from the build, you can see that dojo.js is extraneously included at the end of this file. this is what was reported recently in ticket:14010#comment:4 but thought i'd mention it here too as an aside.

comment:2 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [26745]:

fixed assumption that dojo exists; fixes #14030; !strict

comment:3 Changed 8 years ago by Rawld Gill

The app wasn't loading at all since dojo is not being defined and _WidgetBase was making the assumption that it was; fixed in [26745].

However, the real issue with the problem reported was that the dijit packageMap did not have a complete map so it could not do complete reverse lookups to notice that proper resources were, in fact, in the cache. Replace the dijit package config with...

name: 'myDijit',
location: '../dijit',
packageMap: {
	dojo: 'myDojo',
	dijit: 'myDijit',
	dojox: 'myDojox'
}

...and the application makes exactly one resource demand, dojo.js.

comment:4 in reply to:  3 Changed 8 years ago by bill

FYI, regarding:

The app wasn't loading at all since dojo is not being defined and _WidgetBase was making the assumption that it was; fixed in [26745].

That's what #13603 is about. Note that [26745] only fixes about 10% of the problem, as there are many files in dojo that follow that pattern.

comment:5 Changed 8 years ago by ben hockey

i'll track fixing the others in in #14033 - marked with high priority so it makes the 1.7 hot list.

comment:6 Changed 8 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.