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
Request clarification before answering.
Hi Julian,
i´ve very good experience with ui5-tooling-modules.
See Blog Post by Peter:
https://blogs.sap.com/2021/11/15/using-npm-packages-in-ui5-without-shims/
Here is the example app for third party libraries:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.