Skip to Content
0
Sep 11, 2019 at 03:10 AM

How to unload a sapui5 library ? Is there any api for it like sap.ui.unload ?

103 Views Last edit Oct 10, 2019 at 05:43 AM 2 rev

I want to unload a sapui5 library in onExit of my controller, as one of the library is colliding with an object of an open source library which is used in another controller.

SAPUI5 library causing the issue : resources/sap/ui/thirdparty/require.js

This require.js library has some definition for define function and the open source library 'swagger-ui' looks for some other definition of define function, this conflict causes improper loading of swagger-ui after require.js gets loaded into the browser.

So, I am looking for some way of gracefully unloading of require.js onExit of a controller.