How to control which widgets are called in the widgets.js file for anonymous and authorized users?

0
We have a use case where we want to conditionally show some of the widgets shown on the widgets.js file based on user roles. Such that, an anonymous user will only see widgets used on anonymous user pages and an authorized user will see widgets relevant to that user role.    Is there a way to manipulate how the widget.js file is created?
asked
0 answers