-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
I am trying to add webex widgets to my react vite app with these versions:
"react": "^18.3.1","vite": "6.3.5",
I got this error:
After adding polyfile.ts file and import it into the src/index.ts with these content:
if (typeof global === "undefined") {
// @ts-ignore
window.global = window;
if (typeof globalThis !== "undefined") {
// @ts-ignore
globalThis.global = globalThis;
}
}After adding util-shim.ts file I got this error with these content:
function inherits(ctor, superCtor) {
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true,
},
});
Object.setPrototypeOf(ctor, superCtor);
}
const util = { inherits };
util.inherits = inherits; // Ensure util.inherits is a direct property
export { inherits };
export default util;
// For CommonJS consumers (Vite CJS emulation)
if (typeof module !== "undefined" && module.exports) {
module.exports = util;
module.exports.inherits = inherits;
}
After importing the process to the polyfile.ts, I got this error:

Metadata
Metadata
Assignees
Labels
No labels
