abudaan / heartbeat

a javascript MIDI/Audio sequencer for your browser
http://abudaan.github.io/heartbeat/
120 stars 20 forks source link

codepen / skypack cdn integration #20

Open moonwave99 opened 3 years ago

moonwave99 commented 3 years ago

I tried to require the library in a codepen environment (that requires esmodules via skypack cdn), and I am getting the following error (see pen):

Uncaught ReferenceError: parcelRequire is not defined
    at parcelRequire.ipHv (heartbeat-sequencer.js:60)
    at heartbeat-sequencer.js:63
    at createCommonjsModule (heartbeat-sequencer.js:11)
    at heartbeat-sequencer.js:16

From my understanding, it has to do with some package.json module declaration / this parcel issue.

On the other hand it works fine in codesandbox because it bundles the app via node in a VM, and not directly in the browser.

I understand that it is not strictly related to the module itself, but to access it from codepens makes prototyping / showcasing much faster ^^