Closed luanraithz closed 5 years ago
Sadly the way it worked was download MultiStreamsMixer.js file manually, and change it so it exports what I need, but I think it's a really bad approach.
I'll add import
and require
in the next commit. Something like this:
const MultiStreamsMixer = require('multistreamsmixer');
import { MultiStreamsMixer} from 'multistreamsmixer';
Ok, thanks a lot.
Please install NPM package and test again. (npm install multistreamsmixer
)
import { MultiStreamsMixer} from 'multistreamsmixer';
Yeap it works now, thanks. But you exported as:
module.exports = MultiStreamsMixer;
So I have to import it as:
import MultiStreamsMixer from 'multistreamsmixer';
Do you intend to keep that way ? If so, the readme would have to be changed, I may change it and open a pull request if you don't want to bother with it.
Is there way way of doing the following in a javascript file?
It worked importing the script in the with a
script
tag, but we are trying to avoid this kind of approach (put things in the window). I see that your MultStreamsMixer.ts file exports the class, are there any reason to don't do so at the js file?