AnsweredAssumed Answered

Dojo loader - loading from remote location

Question asked by alterwiel on Apr 23, 2018
Latest reply on Apr 29, 2018 by alterwiel

I'm trying to load a file from a remote location. The file is from Github: bowser/src at master · lancedikson/bowser · GitHub. I've put the bowser.js file in a remote file storage location.  My HTML file contains this.

 

<script>
        var dojoConfig = {
            async: false,
            parseOnLoad: true,
            packages: [{
                "name": "bowser",
                "location": "https://domain/maps/playgrounds/js/bowser"
            }]
        };
    </script>
    <script src="https://js.arcgis.com/4.6/"></script>
    <script src="https://domain/maps/playgrounds/js/playgrounds.js"></script>
    <script src="https://domain/maps/playgrounds/js/bowser/bowser.js"></script>

The playgrounds.js file is the file that loads the packages and instantiates the map.

 

The require looks like this:

require([bowser], function(bowser){
...
}

This all works and the bowser methods are accessible. However, I get this error in the console and can't see why.

 

 

Outcomes