My project contains some legacy Dojo code under the hood. And unfortunately, some of these Dojo modules use circular dependencies.
To be more specific, dojo/dom-construct depends on dojo/dom-attr, which depends on dojo/dom-prop, which depends on dojo/dom-construct.
This causes a stack overflow when using r.js to pack it :
{ Error: RangeError: Maximum call stack size exceeded
In module tree:
symbology/main
luciad/symbology/SymbologyProvider
luciad/symbology/JsonSymbologyParser
luciad/symbology/MS2525Symbology
luciad/symbology/HierarchicalSymbology
luciad/symbology/DelegatingLabelCanvasUtil
luciad/view/style/DelegatingLabelCanvas
luciad/view/style/HTML5LabelCanvas
luciad/view/style/DrawAsyncPointLabelHtmlContents
luciad/view/style/StyleUtil
luciad/view/style/SimpleStrokeStyle
luciad/view/style/HTML5DrawStrokeCommandMixin
luciad/view/style/HTML5CanvasUtil
luciad/dojo/dom-construct
luciad/dojo/dom-attr
luciad/dojo/dom-prop
luciad/dojo/dom-construct
luciad/dojo/dom-attr
luciad/dojo/dom-prop
luciad/dojo/dom-construct
luciad/dojo/dom-attr
luciad/dojo/dom-prop
luciad/dojo/dom-construct
luciad/dojo/dom-attr
luciad/dojo/dom-prop
luciad/dojo/dom-construct
luciad/dojo/dom-attr
luciad/dojo/dom-prop
luciad/dojo/dom-construct
luciad/dojo/dom-attr
...
How can I get around this without modifying the code of these Dojo modules?