From the library source:
- Fork the amplify-js repo in GitHub and clone it locally
- Run
yarn setup-dev
- Run
yarn build:watch
From your sample app:
- Run
yarn link aws-amplify @aws-amplify/core @aws-amplify/datastore @aws-amplify/auth @aws-amplify/ui-components @aws-amplify/ui-react @aws-amplify/api @aws-amplify/api-graphql
- You may not need all of these, but might as well link them just in case
- Import any dependencies into your app from
aws-amplify
, e.g.,
import Amplify, { DataStore } from 'aws-amplify';
- Start your app
- The app should work correctly with the linked dependencies
- Any time you make changes to the Amplify library code source, the package should re-build on save and your sample app should hot reload to reflect the changes.
- When using DataStore, there may be some funk with IndexedDB throwing errors after a Hot Reload/Refresh, in which case a manual page reload should fix it.
- Source maps should work correctly and map back to the original TypeScript code
- Easiest way to open a particular library source file in Chrome Dev Tools > Sources is with ⌘+P and type the name, e.g.,
datastore.ts