used as an app template: npx create-expo-app ‑‑template bare-minimum Prebuild templates These provide the native folders (android and ios). They may also specify some native dependencies in package.json. • bare-minimum
• Copies android & ios folders if missing. (use ‑‑clean to overwrite) • Merges and hoists the template’s {ios,android}/.gitignore. • Ensures you have an app.json. • Renames “HelloWorld” ➡ “MyApp”. • Upgrades the npm run ios/android scripts. • Merges the template’s dependencies into the app’s package.json. • Installs node_modules and CocoaPods. •Runs any config plugins and mods.
1. Take a copy of an existing template, e.g.: https://github.com/expo/expo/tree/main/ templates/expo-template-bare-minimum 2. Make any changes you’d like.
Consume templates via either of these commands: npx create-expo-app ‑‑template <template> npx expo prebuild ‑‑template <template> The value for <template> can be: 1. a file path to a local tarball (made with npm pack): --template path/to/template-1.0.0.tgz 2. a URL to a GitHub repository (must be public): --template https://github.com/:owner/:repo/tree/:ref
template you prebuilt with. So if you’ve prebuilt your app from a custom template, remember to specify that same template in future when rerunning a prebuild! npx expo prebuild --template ./my-template-1.0.0.tgz ❌ npx expo prebuild --clean ✅ npx expo prebuild --clean --template ./my-template-1.0.0.tgz
native projects may go out of date. • CNG is the idea of keeping your native projects up to date by regenerating them (e.g. via prebuild). $ android $ ios % android % ios
Expo SDK. • expo prebuild uses the version of bare-minimum corresponding to the expo package you have installed. • Keeping up to date is simple: npm install expo@latest npx expo prebuild ‑‑clean • To avoid losing manual modifications, declare them via Expo config plugins.
projects into an app template from a prebuild template. • You can build and share your own custom templates. • Continuous Native Generation is about keeping your native projects up to date by running a clean prebuild with each Expo SDK update.