From 485099ebfeda29a68ff231fce2654f92b45fd09c Mon Sep 17 00:00:00 2001 From: lirtual Date: Sat, 21 Dec 2024 20:46:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=B8=BApublic?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/optimize-audio.js | 2 +- scripts/optimize-images.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/optimize-audio.js b/scripts/optimize-audio.js index b7ef328bebf..e595317e70e 100644 --- a/scripts/optimize-audio.js +++ b/scripts/optimize-audio.js @@ -333,7 +333,7 @@ const processDirectory = async (dir) => { }; // 主目录 -const mainDir = path.join(__dirname, '../public/audio'); +const mainDir = path.join(__dirname, '../public'); console.log('开始音视频优化处理...'); console.log(`主目录: ${mainDir}`); diff --git a/scripts/optimize-images.js b/scripts/optimize-images.js index cdca8f09bee..18225cabd32 100644 --- a/scripts/optimize-images.js +++ b/scripts/optimize-images.js @@ -9,7 +9,7 @@ import { Worker, isMainThread, parentPort, workerData } from 'worker_threads'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const sourceDir = 'public/images'; +const sourceDir = 'public'; const SMALL_FILE_THRESHOLD = 5 * 1024; // 5KB // 动态计算最佳参数