fix(packaging): unpack @img prebuilt sharp binaries so deb ships bundled libvips

build.asarUnpack only claimed node_modules/sharp/**, so electron-builder
pruned the @img/sharp-* optionalDependencies: the asar kept 34 pure-JS
@img entries while the bundled libvips shared libraries never shipped.
At boot sharp's loader fell back to a system-libvips-linked binding and
dlopen failed, crashing the main process. Claim the prebuilt packages
explicitly (@img/** and @napi-rs/**) per the sharp+electron-builder
recipe, and guard the built output with a packaging regression test.

Amit Haridas
This commit is contained in:
2026-08-23 19:31:33 +05:30
parent 0babf97f0e
commit b83ba91731
2 changed files with 64 additions and 0 deletions
+2
View File
@@ -116,6 +116,8 @@
"asarUnpack": [
"node_modules/ffmpeg-static/**",
"node_modules/sharp/**",
"node_modules/@img/**",
"node_modules/@napi-rs/**",
"assets/fonts/**"
],
"extraFiles": [],