News for hackers. Stuff that matters.
Re:Launch HN: Moonrepo (YC W23) – Open-source build system by moltar on Wednesday February 22, 2023 @06:02AM (#34894048)
You can do that with esbuild. Just bundle the handler entry into a single file and esbuild will tree shake the cruft out. That's the approach taken by AWS CDK as well.
Re:Launch HN: Moonrepo (YC W23) – Open-source build system by renke1 on Wednesday February 22, 2023 @06:23AM (#34894175)
Yeah, that always works, of course, even though you might want to externalize certain dependencies still. In this case I don't want to bundle the code (although I might end up doing that, anyway)
Re:Launch HN: Moonrepo (YC W23) – Open-source build system by easton on Wednesday February 22, 2023 @06:59AM (#34894371)
You can give esbuild a list of dependencies that you want to be external and it won’t bundle them, I’ve done it with the AWS SDK and it works as expected.