no1b4me's picture
Upload 5037 files
95f4e64 verified
raw
history blame contribute delete
416 Bytes
// this file needs to conditionally import a module, ESM doesn't support this synchronously
// we could avoid .cjs by using node:module but that doesn't sit well with preprocessors like typescript
// and bundlers which can bundle for node like webpack
module.exports = (() => {
try {
return require('utp-native')
} catch (err) {
console.warn('WebTorrent: uTP not supported', err)
return {}
}
})()