MidiWriterJS icon indicating copy to clipboard operation
MidiWriterJS copied to clipboard

How to "import" ?

Open humbleCoder1990 opened this issue 2 years ago • 1 comments

I see the example is using require. Can't I use "import"?

humbleCoder1990 avatar Jan 18 '22 14:01 humbleCoder1990

You can. Maybe you need to add "type": "module" to your package.json.

VictorKolb avatar Apr 17 '22 16:04 VictorKolb

Hi @humbleCoder1990, yes you should be able to import the package assuming your environment is configured for it.

import MidiWriter from 'midi-writer-js';

grimmdude avatar Dec 05 '22 02:12 grimmdude