Seeking guidance on how Plotly/Dash vendors 3rd party javascript

Hi, I have a question how Plotly ends up vendoring 3rd party javascript code.

There’s another python project I am attempting to make a contribution for that is requiring us to vendor javascript code (essentially a no-web option), so that the reports work for systems that do not have the internet.

I’m struggling to deduce how to do that. I believe it will require adding a no-web build option for the pip package, but I am really lost on how to go about pulling in the required javascript libraries at build to vendor them.

Would the developers of Plotly/Dash be able to provide me with some tips to how its done for these projects? Something I can reference to get started? I assume you must as Dash has AG-Grid.

Hello @Matt_D,

Welcome to the community!

Dash uses 3rd party React components by importing the libraries into the component. It is possible to use a similar structure to your package to include the JS files and have Dash cater them automatically.

You can see an example here: