Revert "* Remove timers.js from build.js inject."

This reverts commit 17bb912927.
This commit is contained in:
Derrick Hammer 2023-04-09 00:51:16 -04:00
parent 50271fad44
commit 184eed8be8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 9 additions and 1 deletions

View File

@ -10,5 +10,5 @@ esbuild.buildSync({
define: {
global: "self",
},
inject: ["polyfill.js"],
inject: ["timers.js", "polyfill.js"],
});

8
timers.js Normal file
View File

@ -0,0 +1,8 @@
import { setTimeout, setInterval, clearTimeout, clearInterval } from 'timers-browserify'
var scope = typeof self !== "undefined" && self || typeof self !== "undefined" && self || window;
scope.setTimeout = setTimeout;
scope.setInterval = setInterval;
scope.clearTimeout = clearTimeout;
scope.clearInterval = clearInterval;