Each of the above guides show how to use either of the two module loading approaches listed below. For other frameworks, read below to learn which approach is right for your application and then read the related guide.
- use the webpack plugin to integrate the ArcGIS API into your webpack build
esri-loaderwith framework tools or other bundlers
esri-loader works in applications built with any loader/bundler, such as webpack, rollup.js, or Parcel.
When to use the webpack plugin vs esri-loader
To figure out which is the right solution for you, you need to answer these simple questions:
- Are you using webpack?
- Are you able to configure webpack? Some framework tools discourage or prevent this.
If you answered "Yes" to all of those questions, then you can use the webpack plugin in your application and get the benefit of being able to use the familiar
import syntax for
Most modern frameworks provide a Command Line Interface (CLI) or tools like Create React App, Angular CLI, Vue CLI, or Ember CLI to help developers generate, run, and deploy applications. These tools aim to insulate the developer from the complexities of modern tooling. Even if a tool uses webpack under the hood, it may discourage or even prevent you from manually editing the webpack configuration. In these cases, it may be easier for you to use
esri-loader instead of the webpack plugin.