This repository has been archived by the owner on May 22, 2024. It is now read-only.
experimentalDecorators / emitDecoratorMetadata not supported in netlify CLI #1047
Labels
area: command: dev
area: command: functions
area: functions
type: feature
code contributing to the implementation of a feature and/or user facing functionality
Is your feature request related to a problem? Please describe.
We are trying to use the popular https://github.com/microsoft/tsyringe dependancy injection package within netlify functions. This does not seem to be working, and we are getting the following error:
I think the underlying issue is that Netlify CLI uses esbuild bundler under-the-hood (https://www.netlify.com/blog/2021/04/02/modern-faster-netlify-functions/), which in turn does not support
experimentalDecorators
andemitDecoratorMetadata
(evanw/esbuild#257).The solution could be to use https://github.com/thomaschaaf/esbuild-plugin-tsc but there is no way (that I've found) to modify the netlify CLI's esbuild config
Describe the solution you'd like
A way of modifying the esbuild config during
netlify dev
commands.Describe alternatives you've considered
N/a
Additional context
N/a
Can you submit a pull request?
No.
The text was updated successfully, but these errors were encountered: