Overwriting of init.js files in Portal for ArcGIS regarding custom widgets for WAB

09-03-2021 02:31 AM
Esri Contributor


we developed some custom widgets for WebApp Builder where we used 3rd party libs so we had to change the init.js file to load these libs.

Then we deployed our custom widgets to the customer's Portal so we had to modified the init.js file within the Portal installation accordingly. Now the customer has problem that after every restart of Portal for ArcGIS service the init.js file restore to its default form without our modifications. Of course, the widgets then stop working since they lack 3rd party libs from init.js.
My questions are: Why is this happening? Can I somehow prevent Portal to overwriting init.js?

It includes these init.js at these locations:
<Portal installation folder>\Portal\apps\webappviewer\init.js
<Portal installation folder>\Portal\apps\webappbuilder\stemapp\init.js

Appreciate any help,


0 Kudos
2 Replies
Occasional Contributor III

No.if you want to create custom widgets use the developer's version of WAB and deploy it on your web server.

0 Kudos
Esri Contributor

Hi @LefterisKoumis ,

thanks for your reply, however there is documented way how to deploy custom widgets to Portal:


There is also docuemnted way how to use 3rd party libs (edit init.js file):


But obviously we can't compose these two approaches to deploy custom widget with 3rd party library on Portal for ArcGIS.


0 Kudos