Select to view content in your preferred language

Can calcite been self-hosted and been referenced by inlucde mode?

120
2
12-13-2024 01:00 AM
baohuachu7
Emerging Contributor

I's coding in traditional mode by reference the css and js files. Can calcite been hosted locally on my server?

 

0 Kudos
2 Replies
DitwanDPrice
Esri Contributor

Hey, you should be able to get the files locally by either visiting the calcite repository or getting them from npm. I believe once downloaded you could then place the files you need on your server and reference them in your project. 

You also might need to use `setAssetPath` as described here to make sure you are referencing the correct location that you have the files stored.

0 Kudos
baohuachu7
Emerging Contributor

The process to deploy the resources locally  is as the steps below?

  • in powershell to execute : npm install @esri/calcite-components
  • locate the resources under the installed "node_modules" directory. For example tis is under "D:\workspace\devWorkspace\node_modules\.store\@esri+calcite-components@2.13.2\node_modules\@esri\calcite-components\dist\calcite"
  • copy the files in the directory and deploy to the static resources web server.

 

0 Kudos