Guidance on using with Typescript and Yarn workspaces
See original GitHub issueHey 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 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
TypeScript Monorepos with Yarn - Semaphore CI
A tutorial showing how to configure TypeScript to work in a monorepo and building everything with CI/CD.
Read more >TypeScript + Yarn Workspace Monorepo - DEV Community
Setup yarn workspace in package. Yarn workspace must set private to true . In workspaces field you either explicitly list the path of...
Read more >A guide through The Wild Wild West of setting up a mono repo ...
In this part, I will explain step by step how to setup Lerna, Yarn Workspaces and Typescript in a mono repo. In the...
Read more >TypeScript Monorepo with Yarn and Project References
Project references and Yarn workspaces in combination enable developing TypeScript projects as scale while keeping code modular and manageable.
Read more >Step by Step Guide to create a Typescript Monorepo with Yarn ...
Here is a list of the tools and packages that we will use to make the magic happen: Yarn Workspaces; Lerna; Typescript; Jest;...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
YES! It is working
Thank you for putting in all the time to figure this out with me. I spent over a week trying to get it to work and there are lots of people that have been trying to get similar setups going on the net, but nothing is consistently succeeding. I’ll be sure to write this up and show how it’s done.
Awesome! Looking forward to the write up.
And thanks for taking the time to push example code to
jetpack-test
. Having something we can actually dig into makes debugging so much more tractable and efficient.