sst / ion

SST v3
https://sst.dev
MIT License
1.55k stars 198 forks source link

Feat: Support custom esbuild plugins in the CLI (while deploying) #810

Open dror-weiss opened 1 month ago

dror-weiss commented 1 month ago

I'm using typia in my lambda function and it works great. It works by running a plugin (esbuild, bun, etc) while the bundler runs, transpiling the code into its unique validation output.

I would love to use it during deployment and for that I need to add an esbuild plugin.

I think the best way is to add another configuration in the sst.config.ts app() function allowing the use of esbuild plugins that would then be loaded in the cli (I think here).

thdxr commented 1 month ago

i was looking into this the other day and since we're embedding esbuild in go it's a bit unclear how we would support js plugins

we do need to figure this out and might even resort to using a node process to build but it gets pretty tricky