I’m hitting a wall on trying to solve this problem. I loaded a wasm file and its wrapper js file on S3 and right off the bat it worked and I was stunned! But after I closed the browser and went back, it no longer works. I purged cache, and tried again (several times) but I’m doing something wrong.
Its best to share a link to the problematic code so we can poke at it ourselves.
my initial guess is that dynamics imports work but often get executed in the wrong order unless you take additional steps to force a certain dataflow execution order.
hi @radames, your solution works great with Observablehq. I tried taking this solution to use with svelte but it didn’t work as-is. While this is strictly not a ObservableHQ question, how would one translate this to vanilla HTML/CSS/JS or more preferably under svelte.
@radames sorry for the late response. I just wanted to say this worked beautifully in my Svelte app. In the process of exploring further, I found another way to achieve the same result (based on @mbostock’s link on Emscripten)
in index.html file add <script src='./coolprop.js'></script>