nxapi/src/app
2022-09-15 22:14:26 +01:00
..
browser Fix preferences window never loads if Discord presence options have never been set 2022-09-15 22:10:19 +01:00
common Add window for manually copying the redirect URI for Nintendo Account authentication 2022-09-12 01:22:23 +01:00
main Fix Nintendo Account authorisation callback handling on Windows 2022-09-15 22:14:26 +01:00
preload Add a button to open the preferences window in the Discord setup window 2022-09-07 16:12:13 +01:00
preload-webservice Add support for using web service deep links while the web service is open and fix user selection menu for deep links is closed immediately 2022-09-12 16:50:21 +01:00
README.md Rollup code splitting 2022-07-02 19:57:52 +01:00

Electron app

The Electron app is bundled into ~4 files in dist/app/bundle using Rollup. The main process code is not bundled for development, but is when packaging the app at dist/bundle (with the command line executable at dist/bundle/cli-bundle.js).

electron.ts exports all Electron APIs used in the main process. This is because the electron module doesn't actually exist - Electron patches the require function (but not the module importer). Additionally Electron does not support using a standard JavaScript module as the app entrypoint, so main/app-entry.cts (a CommonJS module) is used to import the actual app entrypoint after the ready event.

Electron APIs used in renderer processes should be imported directly from the electron module as they are always bundled into a CommonJS module.

Any files outside this directory must not depend on anything here, as this directory won't be included in the npm package.