cancel
Showing results for 
Search instead for 
Did you mean: 

Loading an ES6 Module in SAPUI5

02-03-2023 12:17 PM
JulianSchmuckli Participant
2730 views 1 comments Go to solution
SAP Managed Tags
Subscribe

Hello everyone,

I'm currently facing a problem with an external library, which has been written in TypeScript and has been compiled for ES6 modules (so there are import and export keywords).

Now when I try to use this library in my own library, I use the sap.ui.loader.config, to load it. So this looks like this:

 sap.ui.loader.config({
     paths: {
         'libs/scandit/core': 'https://unpkg.com/[email protected]/build/js/index'
     }
 });

Now when I try to run my library it will fail with the following error message:

So now my question is, can I somehow convert this external library in to CommonJS code in order to use this or how should I adapt the shims configuration?

Does anyone have an idea?

Thanks and best regards

Accepted Solutions (1)

Accepted Solutions (1)

Marian_Zeis
Active Contributor

Answers (0)