Closed Murtatrxx closed 9 months ago
tsyringe
requires a feature (emitDecoratorMetadata
) that involves type system which esbuild cannot provide.
If you still want to use esbuild to bundle your source codes, you can use plugins to transform your TypeScript sources to with the reflect metadata. There're 2 possible ways:
But when I run my code with tsx
, is just runs fine, but when i bundle them manually, this happens.
Oh maybe it's the code splitting that is causing the issues?
Because it messes up the import orders
I get this error, but I'm sure i'm importing it on the very first line on my ts file, like this;
here's my tsup config file (it's an esbuild wrapper),
Can someone explain why, or maybe suggest a fix?