feat: add exit hook

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-06-17 18:36:25 +08:00
parent e2505597ff
commit 2fb7ddd890

View File

@ -7,6 +7,8 @@ console.i18n("ms.ployfill.initialize")
require('./es5-ext')
require('./node-shim')
require('core-js')
//@ts-ignore
process.on('exit', () => require.disable())
global.setGlobal('Proxy', require('./proxy').Proxy)
global.setGlobal('XMLHttpRequest', require('./xml-http-request').XMLHttpRequest)
global.setGlobal('Blob', require('blob-polyfill').Blob)