Skip to content

Configuration: rayact.config.json

Schema for rayact.config.json. Fields omitted fall back to built-in defaults; only set a field to override a default.

Add the $schema key for editor autocomplete:

json
{
  "$schema": "./node_modules/@rayact/dev-server/schema/rayact.config.schema.json",
  "rayactAppKey": "my-app",
  "entry": "src/App.tsx",
  "platform": "desktop"
}

Fields

FieldTypeDescription
namestringCross-platform display name used by generated clients and dev-server discovery.
rayactAppKeystringStable app identifier. Also seeds the container-pack obfuscation key.
entrystringEntry source file (e.g. src/App.tsx), relative to the project root.
platformdesktop | android | ios | webDeprecated. Use command flags such as --desktop, --android, --ios, or --web.
devServerobject
devServer.hoststring
devServer.portinteger
devServer.cdpPortinteger
devServer.strictPortbooleanFail if devServer.port is already in use instead of picking the next free port.
androidobject
android.packagestringDeprecated Android application id alias. Use packageName.
android.projectDirstringGradle project dir (contains gradlew), relative to project root.
android.activitystringOptional fully qualified Android activity class. Defaults to the prebuilt Rayact host activity.
android.appNamestringDeprecated Android-only display name. Use top-level name.
android.packageNamestringAndroid application id used by prebuild, install, and launch.
android.iconstring
iosobject
ios.projectDirstring
ios.bundleIdstringiOS product bundle identifier used by prebuild, install, and launch.
linkingobjectApplication deep-link schemes generated into native platform projects.
linking.schemesstring[]
routerobjectFile-based routing (@rayact/router) options.
router.appDirstringRoutes directory relative to the project root. Default "app".
nativeModulesany[]Installed native modules autolink automatically. Entries may disable or configure a package. Legacy name/lib/jsPackage objects are accepted with a warning through 0.0.x.
transformobjectPer-build-mode transforms. Defaults: dev=false, debug=false, release=true.
transform.minifyobject
transform.minify.devboolean
transform.minify.debugboolean
transform.minify.releaseboolean
transform.bytecodeobject
transform.bytecode.devboolean
transform.bytecode.debugboolean
transform.bytecode.releaseboolean
packobjectContainer (.rayactpack) packaging options for release/platform builds.
pack.includestring[]Extra (non-standard) file globs to opt into the pack, relative to the project root.
pack.obfuscatebooleanXOR-obfuscate pack entries with a key derived from rayactAppKey. Default false.
pack.maxChunkSizeintegerMax bytes per pack chunk before splitting. Default 104857600 (100 MB).

Transforms default to dev=false, debug=false, release=true. Development and debug transforms can be overridden. Release bytecode is mandatory; a legacy transform.bytecode.release=false value is accepted but ignored.