FormidableLabs / FormidableLabs/serverless-jetpack
Guidance on using with Typescript and Yarn workspaces
- Dominant language
- JavaScript
- Stars
- 281
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Hey there, Jetpack looks great and I am hoping to be able to use it after struggling with serverless-webpack for the last few days.
I have a typescript monorepo using yarn workspaces, and found [this issue](https://github.com/FormidableLabs/serverless-jetpack/issues/74) in which you say to build manually with a script. However, it's not clear how to configure this with Jetpack. Right now I have
```
package:
include:
- "**/dist/**"
- "!**/node_modules/aws-sdk/**"
- "!**/node_modules/@prisma/**"
- "!**/node_modules/.prisma/**"
- "!**/node_modules/typescript/**"
- "!**/node_modules/.cache/**"
custom:
jetpack:
# Search for hoisted dependencies to one parent above normal.
base: "../.."
```
This is including my entire hoisted `node_modules` folder (including aws-sdk, typescript, other dev dependencies, etc) and so is too large for lambda. Further, it's not clear how to connect it to the function.
Would it be:
```
functions:
stripe:
timeout: 30
handler: dist/stripe-webhook.paymentIntentWebhook
events:
- http:
path: '/webhooks/payment_intent'
method: POST
cors: true
```
???
Any guidance is much appreciated. Thanks
Contributor guide
Assessment
This issue has not been assessed yet.