Browse Source

fix(小程序): 修复支付宝小程序开发工具报错问题

调整编译配置,解决支付宝小程序开发工具中 globalThis 未定义的报错问题,并优化忽略 node_modules 的配置
feige996 6 months ago
parent
commit
49d166a391
1 changed files with 5 additions and 3 deletions
  1. 5 3
      manifest.config.ts

+ 5 - 3
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/**'],
+        },
       },
     },
   },