Skip to content

chore: add callout about committing amplify config files for expo eas build #8274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/fragments/start/getting-started/reactnative/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ When you initialize a new Amplify project, a few things happen:
- It modifies the **.gitignore** file, adding some generated files to the ignore list
- A cloud project is created for you in the AWS Amplify Console that can be accessed by running `amplify console`. The Console provides a list of backend environments, deep links to provisioned resources per Amplify category, status of recent deployments, and instructions on how to promote, clone, pull, and delete backend resources

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplifyconfiguration.json` file to local git repository before running the `eas build` command. This is because the `amplifyconfiguration.json` file is excluded in the default `.gitignore`, and the `eas build` command will not include untracked files in the build. <b>When build completes you must remove the `amplifyconfiguration.json` file from the git repository and never commit and push it to the remote repository</b>.

</Callout>
</InlineFilter>

## Set up frontend

Next, configure Amplify so it can interact with backend services by adding the following code below the last import:
Expand Down
8 changes: 8 additions & 0 deletions src/pages/[platform]/reference/amplify_outputs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ You can also manually create this file for a specified Amplify app ID and branch

{/* @TODO full type/interface to reference */}

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplify_outputs.json` file to local git repository before running `eas build` command. This is because the `amplify_outputs.json` file is excluded in the default `.gitignore`, and the `eas build` command will not include untracked files in the build. <b>When build completes you must remove the `amplifyconfiguration.json` file from the git repository and never commit and push it to the remote repository</b>.

</Callout>
</InlineFilter>

## Extending Amplify outputs file

The `amplify_outputs.json` file is not just a static artifact; it is designed to be extendable to suit the evolving needs of your application. By leveraging the `addOutput` method from your `backend`, you can programmatically add configurations. This is particularly useful for customizing outputs that are not directly exposed through the Amplify constructs or for dynamically adjusting your app's configuration in response to changes in your backend strategy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,14 @@ When you initialize a new Amplify project, a few things happen:
- It creates a file called `amplifyconfiguration.json` in your designated **Source Directory Path** that holds all the configuration for the services you create with Amplify. This is how the Amplify JavaScript client library is able to get the necessary information to connect to your backend services.
- It modifies the `.gitignore` file, adding some generated files to the ignore list

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplifyconfiguration.json` file to local git repository before running the `eas build` command. This is because the `amplifyconfiguration.json` file is excluded in the default `.gitignore`, and the `eas build` command will not include untracked files in the build. <b>When build completes you must remove the `amplifyconfiguration.json` file from the git repository and never commit and push it to the remote repository</b>.

</Callout>
</InlineFilter>

## Install Amplify Libraries

<InlineFilter filters={['react','javascript','vue','angular']}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,14 @@ When you initialize a new Amplify project, a few things happen:
- It modifies the `.gitignore` file, adding some generated files to the ignore list
- A cloud project is created for you in the AWS Amplify Console that can be accessed by running `amplify console`. The Console provides a list of backend environments, deep links to provisioned resources per Amplify category, status of recent deployments, and instructions on how to promote, clone, pull, and delete backend resources.

<InlineFilter filters={['react-native']}>
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplifyconfiguration.json` file to local git repository before running the `eas build` command. This is because the `amplifyconfiguration.json` file is excluded in the default `.gitignore`, and the `eas build` command will not include untracked files in the build. <b>When build completes you must remove the `amplifyconfiguration.json` file from the git repository and never commit and push it to the remote repository</b>.

</Callout>
</InlineFilter>

As you add or remove categories and make updates to your backend configuration using the Amplify CLI, the configuration in `amplifyconfiguration.json` will update automatically.

## Install Amplify libraries
Expand Down