webpack push函数hook
```jslet originObecjt = undefined;
Object.defineProperty(unsafeWindow, "name", {
get() {
return originObecjt;
},
set(newValue) {
originObecjt = newValue;
const originPush = originObecjt.push;
originObecjt.push = function (...args) {
if (args === 512) {
const originSwitchFunc = args
args = function (e, t, n) {
//t是导出内容
const result = originSwitchFunc.call(this, e, t, n)
return result
}
}
return originPush.call(this, ...args);
};
},
});
``` 看看我的勋章 ggnb,+3灌水
页:
[1]