next: esbuild loader

This commit is contained in:
undefined committed 2021-07-29 02:59:50 +08:00
1 parent cca54dc92a
commit 5eaec48002
28 files changed
+171 -113

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
const versionNum = +process.version.replace(/v/gim, '').split('.')[0];
if (versionNum < 14) throw new Error('NodeJS >=v14 required');
if (!global.Hydro) {
global.Hydro = {
version: {
node: process.version,
hydrooj: require('hydrooj/package.json').version,
},
stat: { reqCount: 0 },
handler: {},
// @ts-ignore
service: {},
// @ts-ignore
model: {},
script: {},
// @ts-ignore
lib: {},
// @ts-ignore
ui: {
manifest: {},
nodes: {
nav: [],
problem_add: [],
user_dropdown: [],
},
template: {},
},
// @ts-ignore
error: {},
locales: {},
};
global.addons = [];
}