@nx/expo:prebuild

Create native iOS and Android project files for building natively.

Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.

The prebuild command generates native code before a native app can compile.

project.json:

1{ 2 "name": "mobile", 3 //... 4 "targets": { 5 //... 6 "prebuild": { 7 "executor": "@nx/expo:prebuild", 8 "options": {} 9 } 10 //... 11 } 12} 13
Nx 15 and lower use @nrwl/ instead of @nx/

nx run mobile:prebuild

Examples

The platform option allows you to specify the platform to generate native code for (e.g. android, ios, all).

1 "prebuild": { 2 "executor": "@nx/expo:prebuild", 3 "options": { 4 "platform": "android" 5 } 6 } 7
Nx 15 and lower use @nrwl/ instead of @nx/

Options

platform

pRequired
string
Default: all
Accepted values: ios, android, all

Platforms to sync

clean

boolean
Default: false

Delete the native folders and regenerate them before applying changes

template

string

Project template to clone from. File path pointing to a local tar file or a github repo

install

Internal
boolean
Default: true

Installing npm packages and CocoaPods.