From 591df59ffd1b4926340919aa7dd0348d61e22d5b Mon Sep 17 00:00:00 2001 From: ci010 Date: Tue, 26 Dec 2023 18:02:23 +0800 Subject: [PATCH] chore: Try to simplify the sourcemap path --- xmcl-electron-app/sourcemap.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmcl-electron-app/sourcemap.ts b/xmcl-electron-app/sourcemap.ts index 761a835ce..6a29f86ca 100644 --- a/xmcl-electron-app/sourcemap.ts +++ b/xmcl-electron-app/sourcemap.ts @@ -43,6 +43,9 @@ function CallSiteToString(this: any) { } } } + if (fileLocation.startsWith('node:internal')) { + fileLocation = fileLocation.replace('node:internal', 'internal') + } let line = '' const functionName = this.getFunctionName() @@ -82,7 +85,7 @@ function CallSiteToString(this: any) { } const buildNumber = process.env.BUILD_NUMBER -const url = `https://client.xmcl.app/${buildNumber}` +const url = `/${buildNumber}` const wrapCallSite = (frame: any) => { if (frame.isNative()) return frame