diff --git a/source/package.json b/source/package.json index 20d7ed1..82deefd 100644 --- a/source/package.json +++ b/source/package.json @@ -1,6 +1,6 @@ { "name": "cc-inspector", - "version": "2.0.1", + "version": "2.0.2", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/source/src/inject/index.ts b/source/src/inject/index.ts index 024c506..22fb4b6 100644 --- a/source/src/inject/index.ts +++ b/source/src/inject/index.ts @@ -88,7 +88,9 @@ class CCInspector { case Msg.LogData: { const data: string[] = pluginEvent.data; const value = getValue(this.inspectorGameMemoryStorage, data); - console.log(value); + // 直接写console.log会被tree shaking + const logFunction = console.log; + logFunction(value); break; } case Msg.GetObjectItemData: {