cutterbl/SoundTouchJS

Error "Unexpected token `export`" when importing soundtouchjs

sharad-s opened this issue · 1 comments

Unable to use soundtouchjs as intended because the dist file uses the export keyword which errors out on load.

The line can be viewed here:

export { AbstractFifoSamplePipe, PitchShifter, RateTransposer, SimpleFilter, SoundTouch, Stretch, WebAudioBufferSource, getWebAudioNode };

The error looks like this:
image

I fixed this issue locally by changing the export keyword to module.exports = as so:
image

However, it would be great to have this fixed.

Thanks!

That's because I don't currently provide a commonJS build of SoundTouchJS. You can fork the project and create your own commonJS build, or submit a Pull Request if you like, until I do create one.