mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
添加cache-loader,debug模式下不再使用template缓存,修复一些 bug
This commit is contained in:
1 parent
dd7914e1fb
commit
11368bc831
21 files changed
+248
-266
No files matched your search
+7
-2
@@ -4,7 +4,9 @@
|
||||
|
||||
import './interface';
|
||||
import cluster from 'cluster';
|
||||
import { argv } from 'yargs';
|
||||
import parse from 'yargs-parser';
|
||||
|
||||
const argv = parse(process.argv.slice(2));
|
||||
|
||||
global.Hydro = {
|
||||
stat: { reqCount: 0 },
|
||||
@@ -25,7 +27,10 @@ global.Hydro = {
|
||||
};
|
||||
global.onDestory = [];
|
||||
|
||||
if (argv.debug) console.log(process.argv);
|
||||
if (argv.debug) {
|
||||
console.log(process.argv);
|
||||
process.env.debug = 'enable';
|
||||
}
|
||||
|
||||
async function terminate() {
|
||||
for (const task of global.onDestory) {
|
||||
|
||||
Reference in new issue
Block a user