From 49d166a3911d48b75462cefc813b1db808fad2a9 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 16:30:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B0=8F=E7=A8=8B=E5=BA=8F):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=B7=A5=E5=85=B7=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整编译配置,解决支付宝小程序开发工具中 globalThis 未定义的报错问题,并优化忽略 node_modules 的配置 --- manifest.config.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifest.config.ts b/manifest.config.ts index d9a8a38..b420eb2 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -141,11 +141,13 @@ export default defineManifestConfig({ optimization: { subPackages: true, }, - componentOptions: { - // 解决支付宝小程序和丁丁小程序开发工具报错 【globalThis is not defined】 + // 解决支付宝小程序开发工具报错 【globalThis is not defined】 + compileOptions: { globalObjectMode: 'enable', transpile: { - ignore: ['node_modules/**'], + script: { + ignore: ['node_modules/**'], + }, }, }, },