Building your app for production happens through one build
.
It takes the first argument as the platform, which defaults to web
.
npx one build [web | ios | android]
To build for iOS for example, you would run:
npx one build ios
Ensure your .env
file has a ONE_SERVER_URL
set to your production URL, like:
Terminal
You can choose a deploy target, for now we only support node
or vercel
. This can be chosen via your Vite configuration:
vite.config.ts
And the CLI will print instructions on how to deploy when you run npx one build
.
You can also choose the platform when you run serve, after the build is complete:
npx one serve --platform vercel
We don't have an end to end build command just yet, but we do easily slot into your existing Expo or plain React Native native app build process.
Check out the iOS Native Guide for more information.
Edit this page on GitHub.