ms/packages/ployfill/src/index.ts
MiaoWoo 1e03b104df feat: add node shim
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 22:13:03 +08:00

14 lines
531 B
TypeScript

/// <reference types="@ccms/nashorn" />
import i18n from '@ccms/i18n'
let ployfillStartTime = new Date().getTime();
i18n.initialize();
console.i18n("ms.ployfill.initialize");
require('./es5-ext');
require('core-js');
require('./node-shim');
global.setGlobal('Proxy', require('./proxy').Proxy)
global.setGlobal('XMLHttpRequest', require('./xml-http-request').XMLHttpRequest)
global.setGlobal('Blob', require('blob-polyfill').Blob)
console.i18n("ms.ployfill.completed", { time: (new Date().getTime() - ployfillStartTime) / 1000 });