This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Ignore files via .easignore
Edit page
Learn how to configure Expo Build to ignore unnecessary files during the build process.
A .easignore file defines which files Expo Services should ignore when uploading your project to the Expo Build servers.
Ignoring unnecessary files can help reduce your app's archive size and upload time.
By default, EAS CLI refers to the .gitignore file (if it exists) to determine which files to ignore. If you create a .easignore file, EAS CLI uses it instead of all .gitignore files in your repository. When creating a .easignore file, include all files and directories from your .gitignore file and add additional files you want to ignore.
1
Create a .easignore file in the root of your Git repository.
2
Copy the content of the .gitignore file into the .easignore file. Then, add any files that are unnecessary for the build process.
If your project does not contain android and ios directories, Expo Build will run Prebuild to generate these native directories before compilation.
3
Save the file and trigger a new build.
You've successfully configured your .easignore file.
Adding files to your project upload with .easignore
In addition to ignoring additional files beyond what is in your gitignore file, you can also use the .easignore file to include files with your Expo Build upload that are not committed to source control. This is useful if you have custom scripts that generate temporary files needed for your build process just before the build. To upload a file not in source control to Expo Build, add it to the .easignore file with a ! prefix, along with the rest of your .gitignore contents. The ! prefixed file should be last, so it takes precedence over any prior rules that would ignore it.
If the file contains secrets, use a file environment variable instead of adding it to your project archive.
Check which files EAS CLI uploads
Run eas build:inspect with the archive stage to copy the files that EAS CLI uploads into a directory on your computer. The command does not start a build.
- Log in to your Expo account with
eas loginbefore you run this command. - The output directory must not exist. To delete an existing output directory first, add
--force. - In the full Git workflow, commit your changes before you run this command. The command does not offer to commit them.
Open the output directory and confirm that it contains the files your build needs and none of the files you want to ignore.
How EAS CLI applies .easignore
- EAS CLI reads .easignore only from the root of your Git repository. In a monorepo, the repository root can be above your project directory.
- In the No VCS workflow, EAS CLI reads .easignore from the directory in the
EAS_PROJECT_ROOTenvironment variable. If it is not set, EAS CLI reads it from the root of your Git repository, or from the current directory if there is no repository. - To exclude the shallow .git directory from the project archive, add
.gitto .easignore. - In the full Git workflow, EAS CLI still applies .easignore and deletes the matching files from the clone. The project on Expo Build no longer matches your commit, so EAS CLI shows a warning. To hide the warning, set the
EAS_SUPPRESS_REQUIRE_COMMIT_EASIGNORE_WARNINGenvironment variable to1.
To learn which files EAS CLI uploads in each workflow, see How EAS CLI uploads your project.