@@ -24,6 +24,25 @@ const nativeBridgeResources = [
2424 { from : "native/bridge/darwin-arm64" , to : "bridge/darwin-arm64" , filter : [ "**/*" ] }
2525] . filter ( ( { from } ) => existsSync ( from ) ) ;
2626
27+ // Do not package cross-platform native addons; Windows signing rejects non-PE .node files.
28+ const windowsNativeBinaryExcludes = [
29+ "!**/node_modules/**/prebuilds/darwin*/**" ,
30+ "!**/node_modules/**/prebuilds/linux*/**" ,
31+ "!**/node_modules/**/prebuilds/win32-ia32/**" ,
32+ "!**/node_modules/**/prebuilds/win32-arm64/**" ,
33+ "!**/node_modules/**/bin/napi-*/darwin/**" ,
34+ "!**/node_modules/**/bin/napi-*/linux/**" ,
35+ "!**/node_modules/**/bin/napi-*/win32/ia32/**" ,
36+ "!**/node_modules/**/bin/napi-*/win32/arm64/**"
37+ ] ;
38+
39+ const macNativeBinaryExcludes = [
40+ "!**/node_modules/**/prebuilds/linux*/**" ,
41+ "!**/node_modules/**/prebuilds/win32*/**" ,
42+ "!**/node_modules/**/bin/napi-*/linux/**" ,
43+ "!**/node_modules/**/bin/napi-*/win32/**"
44+ ] ;
45+
2746module . exports = {
2847 appId : "org.liteforms.web" ,
2948 productName : "Liteforms" ,
@@ -61,10 +80,12 @@ module.exports = {
6180 extraResources : nativeBridgeResources ,
6281 win : {
6382 ...windowsSigningConfig ,
83+ files : windowsNativeBinaryExcludes ,
6484 signExts : [ ".dll" , ".node" ] ,
6585 target : [ "nsis" ]
6686 } ,
6787 mac : {
88+ files : macNativeBinaryExcludes ,
6889 target : [ "dmg" ] ,
6990 category : "public.app-category.entertainment" ,
7091 hardenedRuntime : true ,
0 commit comments