Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Thirdparty Js Library Conflicting with Other Plugins

Mesut Can September 22, 2020

Hello,

In my case, my plugin uses HandlebarsJs library in the Jira Server product's issue view screen. But also there is another plugin loading the same library with a different version, then there occures conflicts.

How should I manage this? Any idea helps a lot to me, thanks.

2 answers

1 vote
Piotr Bojko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

You can try load handlebars not as a global instance.

You can try this Handlebars.noConflict(), see https://handlebarsjs.com/api-reference/runtime.html#handlebars-registerdecorator-name-helper-deprecated

Mesut Can September 24, 2020

Thank you for reply, if I use Handlebars.noConflict(), my plugin works but the other vendor's plugin becomes unstable. So the best option was to change the export name of the library and use it like that.

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2020

I'm afraid your only option is to include the same version of the library in your app.  (or if you know you're going to always use the other app, don't include it at all)

Mesut Can September 24, 2020

One of the customers use them both, changing the export name of the library and use it like that become the best option. Thank you for the response.

Suggest an answer

Log in or Sign up to answer