Opened 11 years ago

Closed 6 years ago

#13338 closed enhancement (patchwelcome)

Usage of require in dojox/app prevents build tools from fully optimizing code

Reported by: ddumont Owned by: Dustin Machi
Priority: high Milestone: 1.11
Component: DojoX App Version: 1.7.0b1
Keywords: Cc: zhangyp
Blocked By: Blocking:


./dojox/app/main.js:51 ./dojox/app/scene.js:98

If there is a way to perhaps require the components to provide a lazyload function to load the deps where they can be declared as string literals instead of by reference it would help the process.

Perhaps something like

config.loadDeps = function(cb) {
  require(['application', 'specific', 'deps'], function() {

And in main you would do:

config.loadDeps(function() {
  var modules=[Application];
  for(var i=0;i<config.modules.length;i++){
  ... etc

Change History (4)

comment:1 Changed 11 years ago by Adam Peller

Cc: zhangyp added
Component: DojoxDojoX Mobile
Owner: changed from Adam Peller to Dustin Machi

comment:2 Changed 11 years ago by Dustin Machi

Status: newassigned

As dojox/app gets a little bit further along, I'll be releasing some wrapping scripts that can make a build with layers based on the config itself, which will address this concern. For now however, it falls back to reading that info from the config.

comment:3 Changed 10 years ago by bill

Component: DojoX MobileDojoX App

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.11
Resolution: patchwelcome
Status: assignedclosed

dojox/app is mostly abandoned. Would accept a pull request if someone wants to work on this.

Note: See TracTickets for help on using tickets.