I have react app with cra that uses two different things (mapbox-gl and opus-recorder) my problem is that i used worker-loader to load there needed workers but they made a conflict with each other; is there any other way to deal with this issue or is there any way to fix this issue
i tried importing only the opus recorders worker but i ended up by another problem an error with this message SyntaxError: expected expression, got '<'
here is my code for opus recorder
const options = {
mimeType: 'audio/ogg; codecs=opus',
audioBitsPerSecond: 64000,
};
const workerOptions = {
encoderPath: encoderWorker
};
//opus instance
const recorder = new MediaRecorder(stream, options, workerOptions);
Found where the problem was. there was no need to load worker files with worker-loader
it just needed a link i made symlink from pcackage files dist folder to my public folder(sense web pack would not bundle those files) and just passed the encoder file url to my opus recorder options object