danigb / soundfont-player

Quick soundfont loader and player for browser
MIT License
453 stars 60 forks source link

Module not working with observablehq.com #87

Closed fheyen closed 3 years ago

fheyen commented 3 years ago

Hi, I would love to use soundfont-player in small demo projects on observablehq.com.

When I try to import it, I get an error: Soundfont = $e: invalid module. See this example notebook: https://observablehq.com/d/7d958b5020d46a5a

Is there anything you can do about this?

It's probably caused by something in your build script, and maybe that also affects others use cases (so please consider it, even if supporting observable is not a priority ;) ).

fheyen commented 3 years ago

I fixed it by using a workaround, as shown here: observablehq.com/@fheyen/soundfont-player

Soundfont = require('https://bundle.run/soundfont-player')

Maybe this helps others as well.