Opened 14 years ago

Closed 10 years ago

#6101 closed defect (fixed)

don't force include of everything in dijit/_base

Reported by: bill Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

_Widget.js dojo.require()'s a bunch of code that it doesn't use (focus, wai, etc.) just in case subclasses like Button want to use that code. This is detrimental to making small builds for iPhone, etc. Modify Widget.js and other resources to only require() what they are actually using.

Developers can still get all the code in dijit/base by including dijit.js.

Given that this is sort-of an API change (although it will only impact developers who write custom widgets), won't implement until 2.0, but can implement interim workaround in code providing custom build option to only require() the files that are being used.

//>>excludeStart("dijitBaseExclude", kwArgs.customDijitBase == "true");
dojo.require( "dijit._base" );

Change History (3)

comment:1 Changed 14 years ago by bill

Owner: set to bill
Status: newassigned

comment:2 Changed 14 years ago by bill

(In [12931]) Provide build flag so Widget.js doesn't pull in all of dijit._base. The is an intermim solution for making lightweight builds (especially for custom widgets) that don't use all the code in dijit/base. Refs #6101. !strict

comment:3 Changed 10 years ago by bill

Description: modified (diff)
Milestone: 2.01.7
Resolution: fixed
Status: assignedclosed

This is essentially solved in 1.7 because in AMD mode it doesn't pull in the unrequested modules.

Note: See TracTickets for help on using tickets.