LibreScore / webmscore

MuseScore's core library (libmscore) in WebAssembly! Read mscz data, and generate audio/MIDI/MusicXML/SVG/PNG/PDF sheets right in browsers.
https://www.npmjs.com/package/webmscore/
Other
129 stars 13 forks source link

Complete the documentation about the use of a JavaScript Bundler #5

Open guylan-dieu opened 3 years ago

guylan-dieu commented 3 years ago

I am trying to use webmscore in Angular 12 with WebPack 5.50.0.

It would be nice to complete the documentation with a working example to use webmscore with WebPack.

Without extra configuration, using WebMscore.load from ES6 import produce ReferenceError:

import WebMscore from 'webmscore';

async test() {
    await WebMscore.ready;
    const score = await WebMscore.load('mscx', data);
}

Uncaught ReferenceError: _Path_to_my_project_node_modules_angular_devkit_build_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ is not defined