fix(web): fixed compilation with create-torrent #148
This commit is contained in:
parent
5a8ee5bd52
commit
bceb070b74
1
package-lock.json
generated
1
package-lock.json
generated
@ -14,6 +14,7 @@
|
||||
"bitfield": "^3.0.0",
|
||||
"cheerio": "^1.0.0-rc.10",
|
||||
"compare-versions": "^3.6.0",
|
||||
"create-torrent": "3.33.0",
|
||||
"debug": "^4.3.1",
|
||||
"detect-onebyte-encoding": "^1.0.3",
|
||||
"electron-context-menu": "^3.1.1",
|
||||
|
@ -139,7 +139,8 @@
|
||||
"react-plotly.js": "^2.5.1",
|
||||
"simple-encryptor": "github:DEgITx/node-simple-encryptor",
|
||||
"stun": "1.1.0",
|
||||
"webtorrent": "github:DEgITx/webtorrent"
|
||||
"webtorrent": "github:DEgITx/webtorrent",
|
||||
"create-torrent": "3.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
|
@ -6,7 +6,9 @@ import Search from './search'
|
||||
import Tooltip from './tooltip'
|
||||
import ContextMenu from './context-menu'
|
||||
|
||||
import createTorrent from 'create-torrent';
|
||||
let createTorrent;
|
||||
if(typeof WEB === 'undefined')
|
||||
createTorrent = require('create-torrent')
|
||||
import fs from 'fs'
|
||||
let dialog
|
||||
if(typeof WEB === 'undefined')
|
||||
|
Loading…
Reference in New Issue
Block a user