electron / universal

Create Universal macOS applications from two x64 and arm64 Electron applications
MIT License
112 stars 43 forks source link

fix: support esm entrypoints for asar shim #101

Open erickzhao opened 1 month ago

erickzhao commented 1 month ago

Fixes #90

In cases where two ASAR archives or app folders are created, we create a new index.js shim that points to the correct entrypoint depending on the host system's architecture.

This index.js shim was originally written in CommonJS, making it incompatible with Electron apps using ESM entrypoints, which are available starting in Electron 28.

This PR does a few things: