How to treat different NPM packages?

Hello everyone! Can someone provide an ELI5 on how to evaluate different package functions in Weweb?


For example, I installed the html2canvas package and luxon package. I believe I specified their global properties correctly. However, for html2canvas, I only see this “Tt” function, whereas for luxon I see (as expected) a variety of functions.

My custom scripts using html2canvas has worked fine without any explicit imports, so I’m assuming this package is exposed globally and can be used throughout the web app without any explicit imports. Is that why I am only seeing “Tt”? Because it’s a globally available package? Whereas something like luxon is not and hence I must explicitly import the functions I want to use (and therefore the functions are visible in a list)?

Thank you so much.

I think it’s just a WeWeb display issue, if the properties/methods are available globally. WeWeb hides a ton of stuff until you log it in the browser console, which sometimes is not the best. I’s just ignore it.

1 Like

got it. thank you!