mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
next: esbuild loader
This commit is contained in:
1 parent
cca54dc92a
commit
5eaec48002
28 files changed
+171
-113
No files matched your search
@@ -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 = [];
|
||||
}
|
||||
Reference in new issue
Block a user