aclap-dev / jocly

Javascript library and tools to provide user interface (2D, 3D, VR) and engine for playing board games
https://jocly.com/
Other
71 stars 28 forks source link

Question: Using Jocly Browser Module from a JS CDN? #40

Open aaronsheldon opened 2 years ago

aaronsheldon commented 2 years ago

Hi there,

I'm working on wrapping a Bubble plugin around the Jocly modules. Due to the limitations of Bubble I have to load the Jocly Browser Module from a JS CDN. Now because the Jocly Browser Module dynamically loads JS modules using SystemJS I am hitting CORS policy exceptions in the browser. I was wondering if you have any advice on working with this? Specifically can I address this by using SystemJS import maps, and more ambitiously using depcache to optimize loading?

If the import maps can be used to address CORS, then I can upload a customized version of browser/jocly.js to Bubble; where the require, and pathextract, are replaced with hand coding the base URL of the CDN. After that all I would need to do is reference the customized Bubble hosted jocly.js, and the CDN hosted systemjs in script tags.