Files
Julian Dominguez-SchatzandGitHub 841f29a598 Update build configuration to support mobile app (#8388)
* Update build configuration to support mobile app

* Add release notes

* Fix build

* Depcheck

* Typo

* Deps

* Typo

* fix

* PR feedback

* Typo

* CodeRabbit

* Changing approach

* Scope changes

* Hot-reload

* Remove mobile update and simplify build

* Fix android build

* Unsigned builds

* Revert compat

* Pull from workspace, not relative path

* Attempt to fix build (run on macos)

* [AI] Diagnose Android SDK on mobile runner

* [AI] Configure Android SDK on mobile runner
2026-07-22 22:10:00 +00:00

41 lines
1017 B
TypeScript

import path from 'node:path';
import type { CapacitorConfig } from '@capacitor/cli';
const actualAppWebBuildPath = path.join(
path.dirname(require.resolve('@actual-app/web/package.json')),
'build',
);
const baseConfig: CapacitorConfig = {
appId: 'org.actualbudget',
appName: 'Actual Budget',
webDir: actualAppWebBuildPath,
plugins: {
SplashScreen: {
launchAutoHide: false,
},
},
};
const devConfig: CapacitorConfig = {
...baseConfig,
android: {
...baseConfig.android,
allowMixedContent: true,
},
server: {
cleartext: true,
// Put in http://10.0.2.2:5006 for Android emulator to access server running on local machine.
allowNavigation: ['localhost', '10.0.2.2'],
},
};
// NODE_ENV is unset in development, 'production' in production builds.
const config: CapacitorConfig =
process.env.NODE_ENV === 'production' ? baseConfig : devConfig;
// https://capacitorjs.com/docs/config
// eslint-disable-next-line import/no-default-export
export default config;