You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to...
We are using an Nx monorepo for our projects. As Nx included Vite in its most recent release, we wanted to try it out in one of our react projects. The brain of our applications is a library that injects services via typedi, which worked without any problems.
The problem:
Since we changed to Vite, typedi is not injecting the services anymore. One thing i noticed was that instead of returning the Service as expected it returned an Instance of ContainerInstance2. I could not find any explanation why this suddenly occurs?
The text was updated successfully, but these errors were encountered:
I have no experience with vite but the container instance is injected as the last parameter always, so it seems like your service is not recognized for some reason. Could you please setup a repo where we could test?
I ran into a similar problem, it is because esbuild (it is used under the hood in vite) intentionally does not support emitDecoratorMetadata (evanw/esbuild#257), this causes decorators to not work.
I was trying to...
We are using an Nx monorepo for our projects. As Nx included Vite in its most recent release, we wanted to try it out in one of our react projects. The brain of our applications is a library that injects services via typedi, which worked without any problems.
The problem:
Since we changed to Vite, typedi is not injecting the services anymore. One thing i noticed was that instead of returning the Service as expected it returned an Instance of ContainerInstance2. I could not find any explanation why this suddenly occurs?
The text was updated successfully, but these errors were encountered: