I have an app that is starting to get a rather large amount of JS.
I was wondering if I could start to separate certain bits of code in a separate JS file and then just reference them.
If I reference it in HTML as I do the main JS file I get errors saying the map is not defined.
<script src="js/index.js"></script>
<script src="js/elevationprofile.js"></script>
Is there a way to reference all the split out JS files in the main JS file?
Solved! Go to Solution.
And you're calling dojo/_base/array
twice in your code
I removed
"dojo/_base/array" and array,
I kept
"dojo/_base/array" and arrayUtils,
Still same error
I asked this before and it might be useful for u.
https://community.esri.com/message/518589
Right now im using a module bundler to help me on that...