Importing a module into an iframe

I am trying to do some chart building and it seems the way to do this would be in an iframe

Is there some way to link to the already installed npm libraries I have on my site?
I could use https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js which is an updated version from the example provided which is 4 years old but would require I change my code to update this

What would be the correct syntax to access the npm modules already installed

something like this

Maybe you’d like to use Chart.js. Look at Wix examples, there’s an example how to do it with an iframe and an example how to do it with a custom element.

I have gotten it working hardcoding the js in the script src, I wanted to dynamically point to the one installed on the site already so I didn’t have to update the src with new versions. But I guess this isn’t such a big deal and is usually what I am seeing. Now I am just trying to get data sent to the iframe consistently since it isn’t always ready.

Strangely the example code in help wasn’t working for me for a few days the chart was completely blank but it is now