I am developing lambda function with serverless framework, that uses esbuild under the hood. This function is going to send emails, so i need to store templates along with ts code. The problem is that i need to take the folder with templates to the builded bundle, and i cannot find a esbuild configuration to do that.
I have tried a different esbuild options: --externals
– no profit, --add-externals
– didnt find a way to specify it in esbuild config in serverless.yml
. GPT suggested a custom plugin implementation, but i hope there is a simple way of adding external folders to the bundle.