Skip to content
Source
Sign inSign up
pingdotgg/t3code

build(desktop): reduce installed app size by ~300MB #4824

Mergedwukko(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/4824/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 68 additions and 18 deletions.

x
0 of 2 viewed, 2 left
48 additions and 3 deletionsscripts/build-desktop-artifact.test.tsModified
View file
@@ -13,7 +13,8 @@
createStageWorkspaceConfig,
createStagePatchedDependencies,
createBuildConfig,
- DESKTOP_ASAR_UNPACK,
+ DESKTOP_ELECTRON_LANGUAGES,
+ DESKTOP_FILE_EXCLUSIONS,
InvalidMacPasskeyRpDomainError,
InvalidMacPasskeyPublishableKeyError,
InvalidMockUpdateServerPortError,
@@ -37,6 +38,7 @@
resolvePackageManagerUserAgent,
stageLinuxIconSize,
STAGE_INSTALL_ARGS,
+ WINDOWS_ASAR_UNPACK,
} from "./build-desktop-artifact.ts";
import { BRAND_ASSET_PATHS } from "./lib/brand-assets.ts";
import { HostProcessArchitecture, HostProcessPlatform } from "@t3tools/shared/hostProcess";
@@ -303,10 +305,53 @@
});
​
- it("unpacks the fff shared library for filesystem and FFI access", () => {
- assert.deepStrictEqual(DESKTOP_ASAR_UNPACK, ["node_modules/@ff-labs/fff-bin-*/**/*"]);
+ it("limits Electron locales and excludes the unused Claude SDK executable", () => {
+ assert.deepStrictEqual(DESKTOP_ELECTRON_LANGUAGES, ["en-US"]);
+ assert.deepStrictEqual(DESKTOP_FILE_EXCLUSIONS, [
+ "!**/node_modules/@anthropic-ai/claude-agent-sdk-*/**/*",