I have a legacy project that needs to be able to use dojo.require().
But I'm trying to build things in the newer builder format. No matter what I do, I cannot get the custom dojo.js file built to have "require" in it. I always get the error "dojo.require is not a function".
I don't really care about building my own dojo.js file, but I have to so I can exclude it from my custom layers. Here's a shortened version of my build profile.
layers: {
'dojo/dojo': {
customBase: false,
dependencies: []
},
'dojo/build/app': {
include: [
'dojo/fx',
'dijit/dijit',
'dijit/Dialog',
'dojox/form/uploader'
],
exclude: ['/dojo/dojo']
}
Any thoughts or tips are appreciated.
Looks like I needed to set this in my build profile.
staticHasFeatures: { 'dojo-sync-loader': 1 }
Then dojo.require() is available.
I'm not positive, but this related line may be needed to prevent other issues: 'dojo-xhr-factory': 1