Closed nferch closed 1 month ago
Having trouble importing the cleanup function from CommonJS:
cleanup
5 import { cleanup } from 'node-datachannel'; ~~~~~~~~~~~~~~~~~~
Importing from the polyfills seems to work fine.
For CommonJS, you need to use require. This works for me;
const nodeDataChannel = require("node-datachannel"); .... nodeDataChannel.cleanup();
Having trouble importing the
cleanup
function from CommonJS:Importing from the polyfills seems to work fine.