From 66e60f5f15256c5e42a614564fa690472d286481 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Mon, 20 Oct 2025 13:34:34 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BD=95=E5=83=8F=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=20&=20=E6=89=93=E5=8C=85=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages-user/entry-data/src/index.ts | 8 ++++++++ script/build-game.ts | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/packages-user/entry-data/src/index.ts b/packages-user/entry-data/src/index.ts index 010949b..68c769f 100644 --- a/packages-user/entry-data/src/index.ts +++ b/packages-user/entry-data/src/index.ts @@ -3,12 +3,20 @@ import { create } from './create'; import { patchAll } from '@user/data-fallback'; import { loading } from '@user/data-base'; import { Patch } from '@motajs/legacy-common'; +import { logger } from '@motajs/common'; export function createData() { createMota(); patchAll(); create(); + if (main.replayChecking) { + logger.log( + `如果需要调试录像验证,请在 script/build-game.ts 中将 DEBUG_REPLAY 设为 true,` + + `此时录像验证中可以看到完整正确的报错栈。调试完毕后,记得将它重新设为 false` + ); + } + loading.once('coreInit', () => { Patch.patchAll(); }); diff --git a/script/build-game.ts b/script/build-game.ts index 5afc8f7..9aec556 100644 --- a/script/build-game.ts +++ b/script/build-game.ts @@ -13,6 +13,9 @@ import { RequiredData, RequiredIconsData, ResourceType } from './types'; import { splitResource, SplittedResource } from './build-resource'; import { formatSize } from './utils'; +/** 打包调试 */ +const DEBUG_BUILD = false; +/** 录像验证调试 */ const DEBUG_REPLAY = false; const ansi = { @@ -52,6 +55,7 @@ async function buildClient(outDir: string) { build: { outDir, copyPublicDir: true, + minify: !DEBUG_BUILD, rollupOptions: { external: ['@wasm-audio-decoders/opus-ml'], output: {