完善devtools

This commit is contained in:
fofolee
2022-04-25 17:27:27 +08:00
parent 8f2d332cda
commit ba8a713a57
3 changed files with 29 additions and 74 deletions

View File

@@ -1,7 +1,13 @@
const nodeFns = require("./nodeFns")
window._ = require("lodash")
window.utools = require("./utoolsLite")()
Object.keys(nodeFns).forEach(key => {
window[key] = nodeFns[key]
})
window.exit = () => {
process.exit()
}
// 绕过限制
setTimeout(() => {
Object.assign(window, {
process,
Buffer,
require
})
}, 100);