Open mat-sz opened 2 months ago
I'm trying to build an app with native dependencies that require asarUnpack and to reduce the installer size I'd love to only package the exact dependencies I need.
asarUnpack
Currently I have:
{ "mac": { "target": { "target": "dmg", "arch": ["arm64", "x64"] }, "asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/**/*"], "artifactName": "${productName}-darwin-${arch}-${version}.${ext}", "category": "public.app-category.utilities" } }
I'd propose the structure of the config file to either be changed to something like this:
{ "platforms": [ { "type": "mac", "target": { "target": "dmg", "arch": "arm64" }, "asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/*-arm64/**/*"], "artifactName": "${productName}-darwin-${arch}-${version}.${ext}", "category": "public.app-category.utilities" }, { "type": "mac", "target": { "target": "dmg", "arch": "x64" }, "asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/*-x64/**/*"], "artifactName": "${productName}-darwin-${arch}-${version}.${ext}", "category": "public.app-category.utilities" } ] }
...or allowing targets to override other configuration options:
{ "mac": { "target": [ { "target": "dmg", "arch": "arm64", "asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/*-arm64/**/*"], }, { "target": "dmg", "arch": "x64", "asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/*-x64/**/*"], }, ], "artifactName": "${productName}-darwin-${arch}-${version}.${ext}", "category": "public.app-category.utilities" } }
If you're interested, I can contribute a PR to the project with those changes.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
I'm trying to build an app with native dependencies that require
asarUnpack
and to reduce the installer size I'd love to only package the exact dependencies I need.Currently I have:
I'd propose the structure of the config file to either be changed to something like this:
...or allowing targets to override other configuration options:
If you're interested, I can contribute a PR to the project with those changes.