Hello,
I'm currently using `@arcgis/core` for my React application but I'm running into long build times due to something with how webpack is code splitting the `@arcgis/core` code. I'm seeing now that there is another library called `arcgis-js-api` and I'm wondering what the difference between the two is since they both look like they're doing the same thing.
Thanks
Same API just different modules: @arcgis/core uses ES modules and arcgis-js-api uses AMD modules. The underlying functionality is exactly the same. How is your webpack configured? cc @ReneRubalcava
@JamesBrett Nope, that doesn't sound right. Can you provide a simple github repo that we can look at? Here are our sample app build sizes for comparison: https://github.com/Esri/jsapi-resources/blob/master/esm-samples/.metrics/4.23.0.csv
I haven't been able to get @arcgis/core to work given the large build size and build time. I've been stuck using esri-loader.
@AndyGupSo as I understand it the @arcgis/core copies all assets at build? I used CRA to display a globe and my build is over 1GB.Is this the correct functionality of @arcgis/core? Will esri-loader give me smaller builds?
I'm going to spin up a thread for this
Even trying to build the sample jsapi-create-react-app takes a very long time
I see. Not copying the assets on 4.19 is working but I'm still having my issue with my production build.
My main issue is that whenever I import a single module from @Anonymous User/core e.g:
import Graphic from '@arcgis/core/Graphic'
My webpack production build process runs out of memory.
Maybe try updating via `npm i '@ArcGIS/core@next`. Starting at 4.19 (coming out later this month) there's no asset copying by default (unless you need the assets locally). Here's our working sample for 4.18: https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app
I'm just spun up a Create React Application
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.