Wavesurfer.js: Provide wavesurfer.js as an ES6 module

Created on 14 May 2016  Â·  8Comments  Â·  Source: katspaugh/wavesurfer.js

Hi everyone. Can this be used with ES6?

enhancement

Most helpful comment

FYI I'm currently working on a PR for this. Can't say when it will be ready but I'm thinking ~2 weeks

All 8 comments

I'm not sure what exactly you are asking. ES5 in which wavesurfer.js is written, is a subset of ES6. So yes, you can load and use the library in ES6 code.

Thanks for your reply. I can use the library fine with IonicJS if I include the library in index.html. But when trying to use the method below I can’t access wave surfer.

import * as WaveSurfer from 'wavesurfer.js';

On May 14, 2016, at 10:04 AM, katspaugh [email protected] wrote:

I'm not sure what exactly you are asking. ES5 in which wavesurfer.js is written, is a subset of ES6. So yes, you can load and use the library in ES6 code.

—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/katspaugh/wavesurfer.js/issues/723#issuecomment-219222060

Ah, no. Unfortunately, import is not supported at the moment. I'll reopen this ticket to add it.

thanks mate!

On May 14, 2016, at 10:15 AM, katspaugh [email protected] wrote:

Ah, no. Unfortunately, import is not supported at the moment. I'll reopen this ticket to add it.

—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/katspaugh/wavesurfer.js/issues/723#issuecomment-219222626

:+1: on this request !
Would be really great to be able to use wavesurfer lib and plugins via ES6 import !

pull requests are welcome!

FYI I'm currently working on a PR for this. Can't say when it will be ready but I'm thinking ~2 weeks

Was this page helpful?
0 / 5 - 0 ratings