Improve #ec2bf1a95d6c45c093f68df832bc6bcbdd372a5a

This commit is contained in:
Koen Kanters
2022-04-20 17:59:16 +02:00
parent ec2bf1a95d
commit e305ecf571
+1 -1
View File
@@ -47,7 +47,7 @@ async function build(reason) {
rimraf.sync('dist');
const env = {...process.env};
const _600mb = 629145600;
if (_600mb > os.totalmem()) {
if (_600mb > os.totalmem() && !env.NODE_OPTIONS) {
// Prevent OOM on tsc compile for system with low memory
// https://github.com/Koenkk/zigbee2mqtt/issues/12034
env.NODE_OPTIONS = '--max_old_space_size=256';