To get started, fork the following project.
git clone git@github.com:swaminator/monorepo-amplify.git
This project contains the frontend code for an angular and react Todo app. The repository has the following structure:
> monorepo-amplify
In the Amplify Console, navigate to Rewrites and redirects. Add the following depending on what you want: | |
Case 1: | |
Actual content location: /about/index.html | |
What user types in browser: /about/index.html | |
What user sees in browser: /about/ | |
Configure in Amplify Console: /about/index.html /about/ 301 | |
Case 2: | |
Actual content location: /about.html |
#!/usr/bin/env bash | |
set -e | |
IFS='|' | |
help_output () { | |
echo "usage: amplify-push <--environment|-e <name>> <--simple|-s>" | |
echo " --environment The name of the Amplify environment to use" | |
echo " --simple Optional simple flag auto-includes stack info from env cache" | |
exit 1 | |
} |
The Amplify team is hiring 🥳!
It was recently announced that AWS Amplify now has built in support for monorepos. Customers who had previously used manual commands in their applications build settings are now able to trigger builds in various apps can now consolidate all of their app settings in a single file at the root of the repository.
Let's assume you have two Amplify apps - app1 and app2 that belong to your monorepo.
amplify.yml
file in your repo, rename it to amplify-old.yml
to back it up.version: 1
frontend:
version: 1 | |
frontend: | |
phases: | |
build: | |
commands: [] | |
artifacts: | |
baseDirectory: / | |
files: | |
- '**/*' | |
cache: |