Sep 25, 2023 by
Kadi Kraman
We have added support for Bun on Expo CLI and EAS! This means you can use Bun to create your Expo app, install packages, run scripts and build your app on EAS.
The first step (if you haven't yet) is to install Bun on your local machine. After installation, you should have access to bun
in your terminal.
To create a new Expo app:
bun create expo my-app
Run a package.json script:
bun run ios
Install a package:
bun expo install expo-av
You can also use Bun to install packages, but output a readable yarn.lock as well as the bun.lockb:
bun install --yarn
EAS will decide which packager to use based the lockfile in your codebase. So if you want EAS to use Bun, run bun install
in your codebase and ensure it creates a bun.lockb - the Bun lockfile. As long as this lockfile is in your codebase, Bun will be used as the package manager for your builds.
EAS will use bun@1.0.2
by default. If you want or need to use a particular version of Bun, you can configure the exact version in each build in your eas.json.
eas.json
{
"build": {
"test": {
"bun": "1.0.0"
// other settings...
}
// other build profiles...
}
}
Evan Bacon adding Bun support on the CLI
Cedric van Putten improving Bun support on the CLI
Szymon Dziedzic adding Bun to existing images
Kadi Kraman adding Bun to EAS