mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: node版本需求降至node10.4
This commit is contained in:
1 parent
26a381ce3f
commit
289b4da1fe
3 files changed
+19
-5
No files matched your search
@@ -1,6 +1,10 @@
|
||||
const versionNum = +process.version.replace(/v/gim, '').split('.')[0];
|
||||
if (versionNum < 14) throw new Error('NodeJS >=v14 required');
|
||||
import cluster from 'cluster';
|
||||
|
||||
const versionNum = +process.version.replace(/v/gim, '').split('.')[0];
|
||||
if (versionNum < 10) throw new Error('NodeJS >=10.4 required');
|
||||
else if (versionNum < 14 && cluster.isMaster) {
|
||||
console.warn('NodeJS version <14, startup performance will be impacted.');
|
||||
}
|
||||
if (!global.Hydro) {
|
||||
global.Hydro = {
|
||||
version: {
|
||||
|
||||
Reference in new issue
Block a user