Skip to content

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.

fix(release): the installer stops carrying local export output, and `dist` builds it all

esengine3c073f44ed64
diff --git a/desktop/electron-builder.yml b/desktop/electron-builder.yml
index 85daeb917..313a27e01 100644
--- a/desktop/electron-builder.yml
+++ b/desktop/electron-builder.yml
@@ -63,6 +63,10 @@ extraResources:
# projects, staged as real directories (createFromTemplate copies a template
# with fs.cp, which cannot source from inside the asar). The launcher reads
# resources/templates then resources/examples — see electron/launcher.ts.
+ # The dist-* exclusions matter as much as the others: a package a developer
+ # exported (dist-playable/, dist-wechat/, dist-game/ … — `dist-<platform>`) sits
+ # inside the example it came from, and `**/dist/**` never matched those names, so
+ # local export output rode into the installer.
- from: templates
to: templates
filter:
@@ -70,6 +74,7 @@ extraResources:
- "!**/.esengine/**"
- "!**/node_modules/**"
- "!**/dist/**"
+ - "!**/dist-*/**"
- from: ../examples
to: examples
filter:
@@ -77,6 +82,7 @@ extraResources:
- "!**/.esengine/**"
- "!**/node_modules/**"
- "!**/dist/**"
+ - "!**/dist-*/**"
win:
target: nsis
# Assisted (non-oneClick) installer: electron-builder derives the oneClick
diff --git a/desktop/package.json b/desktop/package.json
index 8ac02be5b..50bbb18ee 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -10,8 +10,8 @@
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build && node scripts/bundle-mcp.mjs",
- "dist": "vite build && electron-builder",
- "dist:dir": "vite build && electron-builder --dir",
+ "dist": "pnpm run build && electron-builder",
+ "dist:dir": "pnpm run build && electron-builder --dir",
"preview": "vite preview",
"typecheck": "tsc --noEmit",
"test": "vitest run",