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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Is there any way to have multiple custom widgets referencing a third-party JS at the same time?

CZ_9645217
15-Moonstone

Is there any way to have multiple custom widgets referencing a third-party JS at the same time?

Hi,

 

The structure of my custom widget is shown below, Now a widget referencing a third-party widget is possible, but if I need to develop 10 widgets, I need to put 10 of the same third-party JS, so the size will become larger and may affect performance.

 

if it is possible to put only one third-party JS in the widget package, and the other widgets can refer to the JS?

 

js.png

 

Thank you!

Chason

ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:CZ_9645217)

Hi @CZ_9645217.

 

You could load the third party library into the platform, where it would be available for all widgets.  Here is an example from our IoT Tech Tips forum.

 

It may also be possible to set dependencies to ensure the library is loaded to avoid having to load it with each widget.

 

Regards.

 

--Sharon

View solution in original post

2 REPLIES 2
slangley
23-Emerald II
(To:CZ_9645217)

Hi @CZ_9645217.

 

You could load the third party library into the platform, where it would be available for all widgets.  Here is an example from our IoT Tech Tips forum.

 

It may also be possible to set dependencies to ensure the library is loaded to avoid having to load it with each widget.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @CZ_9645217.

 

If you feel your question was answered, please mark the previous response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements


Top Tags