Hi all,
we have created a web app based on custom builds, using webpack. We are managing the assets of JavaScript API (4.24.7) by copying the locally and setting the value of esriConfig.assetsPath to the right path. Everything works perfectly!
We have decided to start integrating Calcite Design system (1.0.0-beta.92) to our web app. So far great experience! We are also managing the assets of Calcite locally. So we copy them to a location and then we use the function setAssetsPath to define the path. Everything works fine too (almost 😉 )!
The JS API is using Calcite assets (1.0.0-beta.82 for the version we use). They exist in the folder node_modules\@arcgis\core\assets\components\assets.
Everything works fine overall but we noticed the following:
- All the calcite design components are using the assets from the JS API path and not from the setAssetsPath. Either the setAssetsPath doesn't work properly or there is a conflict between setting assetsPath for JS API and for calcite design? Again, everything works, but we are using different versions of assets. It might become an issue in the future?
- Since JS API is using calcite components, the css of the JS API includes already calcite styles. Eventually we are loading them twice (and from different versions), one css from calcite and once css from JS API. It makes sense, but I wonder if there is a more optimal way to do this.
So the question would be: Are there any best practices of integrating Calcite Design with JS API with custom builds?
There are very nice examples in github for Calcite Design and nice examples for JS API but I could not find any example with both of them together 😀