From 13b04a904ecf13c15fde8ca78f5c690383cd5f42 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Wed, 17 Jun 2020 18:36:25 +0800 Subject: [PATCH] feat: add exit hook Signed-off-by: MiaoWoo --- packages/ployfill/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ployfill/src/index.ts b/packages/ployfill/src/index.ts index d258a54f..90588190 100644 --- a/packages/ployfill/src/index.ts +++ b/packages/ployfill/src/index.ts @@ -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)