Skip to content

Commit 198fbfc

Browse files
authored
chore: add callout about committing amplify config files for expo eas build (#8274)
* chore: add callout about committing amplify config files for expo eas build * chore: expand the callout for not push amplify_outputs to remote repo
1 parent 3ef3fbc commit 198fbfc

File tree

4 files changed

+32
-0
lines changed
  • src
    • fragments/start/getting-started/reactnative
    • pages
      • [platform]/reference/amplify_outputs
      • gen1/[platform]/start

4 files changed

+32
-0
lines changed

Diff for: src/fragments/start/getting-started/reactnative/setup.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ When you initialize a new Amplify project, a few things happen:
126126
- It modifies the **.gitignore** file, adding some generated files to the ignore list
127127
- 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
128128

129+
<InlineFilter filters={['react-native']}>
130+
<Callout>
131+
132+
**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>.
133+
134+
</Callout>
135+
</InlineFilter>
136+
129137
## Set up frontend
130138

131139
Next, configure Amplify so it can interact with backend services by adding the following code below the last import:

Diff for: src/pages/[platform]/reference/amplify_outputs/index.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ You can also manually create this file for a specified Amplify app ID and branch
3535

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

38+
<InlineFilter filters={['react-native']}>
39+
<Callout>
40+
41+
**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>.
42+
43+
</Callout>
44+
</InlineFilter>
45+
3846
## Extending Amplify outputs file
3947

4048
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.

Diff for: src/pages/gen1/[platform]/start/getting-started/setup/index.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,14 @@ When you initialize a new Amplify project, a few things happen:
567567
- 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.
568568
- It modifies the `.gitignore` file, adding some generated files to the ignore list
569569

570+
<InlineFilter filters={['react-native']}>
571+
<Callout>
572+
573+
**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>.
574+
575+
</Callout>
576+
</InlineFilter>
577+
570578
## Install Amplify Libraries
571579

572580
<InlineFilter filters={['react','javascript','vue','angular']}>

Diff for: src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,14 @@ When you initialize a new Amplify project, a few things happen:
258258
- It modifies the `.gitignore` file, adding some generated files to the ignore list
259259
- 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.
260260

261+
<InlineFilter filters={['react-native']}>
262+
<Callout>
263+
264+
**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>.
265+
266+
</Callout>
267+
</InlineFilter>
268+
261269
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.
262270

263271
## Install Amplify libraries

0 commit comments

Comments
 (0)