slnsw / react-sheet-music

Interactive sheet music component in React
MIT License
38 stars 9 forks source link

Failing to build with rollup #10

Open Dema opened 3 years ago

Dema commented 3 years ago

Could you rework a bit this part https://github.com/slnsw/react-sheet-music/blob/master/src/SheetMusic.tsx#L67 It tries to load "abcjs" with require and rollup refuses to recognize this as an import and code goes strait in the browser resulting in Uncaught ReferenceError: require is not defined.

I wonder what was the reason for loading it in such way?. maybe we can use dynamic import()?.