Hi fellow developpers
I'm trying to import jsfxr in my project, first time I'm using the script feature.
(this is the famous JS sound generator : sfxr.me )
In main.js, I'm using :
import * as sfxrModule from "./sfxr.js";
But I got this error :
Uncaught TypeError: Cannot set properties of undefined (setting 'jsfx')
The code is at the beginning of the script file :
(function(root, factory) {
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = factory();
} else {
root.jsfx = factory(); // error at this line
}
}
Any information about this ?
Thanks