Spidi
Spidi
TTCTheo's Typesafe Cult
Created by Spidi on 9/15/2023 in #questions
"Backend" framework and bundlers. The heck do I do? 🤯
Hey folks! I need bigger TS brains to help me out here 👀 Context: I've started rewriting a 3 yo framework that's currently a single package written in JavaScript, no JSDoc, and with way too many dependencies. The rewrite is 100% in TypeScript and has a monorepo architecture. TLDR about the project: This "framework" is basically a bunch of custom functions/commands that users can use either with Cypress or with Playwright to do certain things. Except for custom functions/commands for these tools, we also allow them to do other things like spin up server instance for in a given test with simple interface, etc. Previously a user would install our single bloated package with no types whatsoever, but now they will be installing fully typed packages depending on the tool they're using and the functionalities they need. Problem: I've never before in my life set up projects from scratch. I've always contributed to already existing codebases or I've used tools like create-t3-app to do all the heavy lifting for me. That's why I'm learning as a go and I've got a question regarding bundlers and transpilers/compilers. For webapps it's obvious that you need a bundler, but what's exactly the situation when it comes to creating backend applications and especially backend libraries for other developers? Should I stick with just tsc or should I consider using a bundler? What are the advantages/disadvantages of using bundlers for backends? Are there any other tools I should consider for this use case? Any advice appreciated 🙏
2 replies