Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(amplify-cli-core): use build script properly for overrides
Updated the TypeScript compilation of overrides so that it doesn't require `node_modules/.bin/tsc`. Instead, it simply relies on the `build` script to execute `tsc`. This is more flexible and can support alternative setups w/ hoisting (e.g. via Yarn workspaces). This is an override corollary fix to aws-amplify#11854, which is for custom resources. This is an improvement over my previous PR in aws-amplify#13858 in that it works with any package manager by ensuring the `--project` and `tsconfig.json` files are passed through to the `tsc` script. The previous implementation didn't work with `npm` because it doesn't pass through additional args like `yarn` does. The fix was easy: simply separate the build run with `--` so that the remaining args are treated as positional for the `tsc` script. I've confirmed the fix works with both `yarn` and `npm` 💪 aws-amplify#11889
- Loading branch information