Closed adamleemiller closed 2 years ago
Hi Adam, thanks for the kind words!
For modern UI libraries like React its standard practice to use a webpack toolchain in order to package and chunk dependencies into a minimized bundle. If you're using create-react-app
that's set up for you automatically.
As such, instead of using the JS library as a Githubissues.
Hello! First off I want to say that you've done an great job with this module. As a JS developer for many years now and a 20+ year IT Professional who loves to build with LEGO (along with my kids), I am finally getting into LEGO PoweredUp and came across your module. I verified that it worked using the browser (Chrome ONLY, for those that are curious as FF does not have support for WebBLE, yet) however when I imported the module into Vue 3 so that I could build a small app that would eventually be used for a Science Fair Project, I was unable to actual get the library to work correctly. After some digging and getting some assistance from another developer, we were able to determine that the browser version does not actually export anything and instead, creates a DOM object called "window.PoweredUP". Unfortunately, this will not work in modern JS UI frameworks such as React and Vue. I would like to possibly contribute another option so that we can import the module into a modern JS UI framework. Would this be OK with you?
Thank you.