Aurelia throws exports is not defined

94 views Asked by At

I have an Aurelia typescript application that uses Mediasoup-client.

The application is built with aurelia-cli custom bundler (require.js, all defaults).

When I include mediasoup-client library in the application and start it, I see this error in the browser: (there are no errors during compile/build)

enter image description here

When I open this RtpParameters.js file (part of mediasoup-client, installed with npm install mediasoup-client --save) I see this code:

enter image description here

This all works fine when I use webpack, but I must migrate to require.js. How to solve this problem?

1

There are 1 answers

0
Luka On

I resolved my problem by importing only needed modules from mediasoup and not the entire namespace.