I am developing a custom Fiori app (let's call it App1) that uses the thirdparty library D3. I needed the newer version (7.5.0) since the existing sap/ui/thirdparty/d3
, that is bundled with OpenUI5, is only at 3.4.12. I did:
Download the d3.js
with version 7.5.0.
Save it in my project folder:
Add the resource to my manifest.json
:
"resources": {
"js": [
{ "uri": "library/d3.js" }
]
}
At first loading of the application, everything works fine. I am able to use version 7.5.0. But when I switch between Fiori apps from the SAP Fiori launchpad (FLP), the D3 library gets overwritten by version 3.4.12.
I tried to load the d3.js
version 7.5.0 again when I reopen the App1, but it does not take effect.
How can I retain my D3 version to 7.5.0 even when I navigate to other apps?
manifest.json
section /sap.ui5/resources/js
is deprecated. Remove the section.sap.ui.loader.config
API accordingly:
shim
settingsthis.getRouter().initialize()
or even before declaring the UIComponent's list of dependencies in your Component.js
.Here is an example with more information: https://stackoverflow.com/a/75177939/5846045.