From 46bd7111849f5418ea5ff0c857430ec2f636b852 Mon Sep 17 00:00:00 2001 From: Royan Xu <132798457+happylabdab2@users.noreply.github.com> Date: Fri, 25 Apr 2025 18:25:02 -0700 Subject: [PATCH] Update core.js Added magnify edgecase --- core/core.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/core.js b/core/core.js index 1e499d5..6b6f292 100644 --- a/core/core.js +++ b/core/core.js @@ -368,8 +368,12 @@ var main;(function(){` if (EFIConfig.doMinify) { _status("Shrinking file..."); await wait(50); - - patchedFile = await minify(patchedFile, parser, EFIConfig); + if (globalThis.process) { + let _minify = require("./minify").minify; + patchedFile = await _minify(patchedFile, parser, EFIConfig); + } else { + patchedFile = await minify(patchedFile, parser, EFIConfig); + } } @@ -436,4 +440,4 @@ if (globalThis.process) { patchClient: patchClient, conf: EFIConfig } -} \ No newline at end of file +}