A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(wechat): down-level export bundle to es2017 for real devices
yhh33e41e85afca
diff --git a/desktop/electron/exportWeChat.ts b/desktop/electron/exportWeChat.tsindex 9d69dce2a..cfc2b8509 100644--- a/desktop/electron/exportWeChat.ts+++ b/desktop/electron/exportWeChat.ts@@ -381,7 +381,9 @@ export async function exportWeChat(opts: {bundle: true,format: 'cjs',platform: 'browser',- target: 'es2020',+ // Real-device WeChat rejects es2020 syntax (`??`, `?.`) even though the+ // devtools accepts it; es2017 down-levels those while keeping async/await.+ target: 'es2017',alias: esengineAlias(opts.sdkDir, 'index.wechat.js'),minify: opts.minify ?? false,sourcemap: false,