Question

How to include an external JS library into bpm'online

Hi

I'm developing a custom widget for bpm'online Account page using custom UI Component.

The library is available via CDN or local file and depends on jquery.

How should I reference it?

Thank you

Like 0

Like

10 comments

Dear Mohamed,

You just need to create a new module in the configuration, use define to declare it and copy the library text. I advise you to see how jQuery is connected in the configuration (the module is called the same).

Regards,

Anastasia

It works! Thank you.

Anastasia Botezat, Mohamed Ouederni

Hello. I could only find a jQuery migrate script included as a module and not jQuery. Can you help me find how jQuery is included as a script??

M Shrikanth,

 

jQuery was deleted from the configurations as a script in the latest versions and you need to call the jQuery.getScript function in the console and review the sources tab to find the schema content

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar. Thanks for your reply. So can we replicate how 'jQuery migrate' was included to include any other external libraries? Any other examples I can look at in Configuration?

M Shrikanth,

 

Please call jQuery.getScript function in the console and review the sources tab as I recommended and use it as an example to add your own jQuery to the system.

 

Best regards,

Oscar

Hello! I've run into a similar problem, I would like to include libphonenumber-js and use it in my client code. The library is also available via a CDN. I'm not sure how I can integrate the library, the source code of jQuery.getScript didn't really help. Any advice would be appreciated.

 

Kind regards

Kai

Kai Wilker,

 

Can you please specify if you get any errors with calling jQuery.getScript function?

This is basically the easiest way to do that,

 

Thank you!

Bogdan Spasibov,

 

yes, there are error messages once I call the getScript function, see attached screenshot.

Hi Anastasia,

 

Do you have any existing example of a module calling external js library?

Show all comments