Allow for esbuild configuration #15883
Closed
erikm-icario
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I made a change to Serverless Stack's (https://github.com/serverless-stack/serverless-stack) Function construct so that the nodejs bundling process ran an esbuild script file that merges options set by the construct with a loaded configuration instead of calling esbuild directly. This enabled things like plugins while bundling the functions. I use this for decorator metadata.
It doesn't seem like there's any reason why this approach couldn't be done with the existing nodejs lambda construct. That would be nice because I can then also benefit from the Docker bundling, which Serverless Stack's Function forgoes.
The approach seems pretty simple:
This approach should work for local and docker bundling if done correctly.
I took a stab at this but ran into some issues running/testing it.
There are also some questions:
Beta Was this translation helpful? Give feedback.
All reactions