Would it be easy to allow us to pass in plugins fo...
# help
h
Would it be easy to allow us to pass in plugins for esbuild?
f
Hey @Harry Collin it shouldn’t be too hard. We just need to make sure it works well with the watcher in
sst start
. Is there a specific plugin you are looking to use?
h
I want to be able to use "emitDecoratorMetadata": true" in my Typescript
f
Got it! Let me pull in Jay. @Jay how easy is it to support esbuild plugin? This is the 2nd time
emitDecoratorMetadata
has been brought up. This is a snippet taken from the plugin README:
Copy code
const esbuildPluginTsc = require('esbuild-plugin-tsc');
 ...
 esbuild.build({
   ...
   plugins: [
     esbuildPluginTsc(),
   ],
 })
Should
bundle
take plugin objects like this?
Copy code
const esbuildPluginTsc = require('esbuild-plugin-tsc');

sst.Function(this, "MyFunction", {
  handler: "src/lambda.main",
  bundle: {
    plugins: [ esbuildPluginTsc() ]
  },
});
h
Thanks for looking into this 🙂
f
@Harry Collin @Jay I dug into this a bit more and ran into a couple of issues implementing the above scheme. I documented what I tried in this discussion. I need to try out the possible solutions.
h
Thanks @Frank! Hopefully there is an easy solution to this. What issues did you encounter?