Search code examples
javascriptwebpackbrowserifyarcgisarcgis-js-api

Is there an Arcgis esri commonjs version?


I am working with geolocation with Arcgis Esri.

After doing some research I was wondering if there is any versión in npm to work with commonjs, I see every time I work the examples that there is a call to arcgis modules by using AMD notation.


Solution

  • Since the ArcGIS API for JavaScript is really designed for front end coding it makes more sense that it implements AMD rather than commonjs.

    This is the closest you are going to get to integrating it with other build tools for right now.

    https://developers.arcgis.com/javascript/3/jshelp/inside_bower_custom_builds.html#build-requirejs

    Esri is making slow but steady progress making their API compatible with modern dev tools. Many of the APIs limitations are inherited from Dojo.