Copy files to dist folder

By default, all files in the src/runtime/assets folder and the src/setting/assets folder will be copied to the dist/runtime/assets folder and the dist/setting/assets folder respectively when compiling. Starting at version 1.13, developer edition of Experience Builder supports copy other files to the dist folder when compiling of your custom widget. The reason you need to do this may be your widget uses a third-party library and you need to copy some files from the library to the dist folder.

To do this, simply place a file named copy-files.json in the widget root folder and put the files you need to copy in this file. The following is an example of the copy-files.json file:

1
2
3
4
5
6
[
  {
    "from": "node_modules/folderOrFile",
    "to": "folderOrFile"
  }
]

Both the from and to are relative to the widget folder.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close