-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bindings not generated with Parcel #8
Comments
I was looking to use parcel as well in my AWS lambda, anyone get this working? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
First I want to say that I am very glad you made this compile time DI library for TS! It does not have many features, it just contains what is necessary, that is perfect :)
I am trying to make the di-compiler work with Parcel (I use Parcel to set up "easily" a React project with di-compiler after that). Almost everything is working (it correctly generates the constructors data), however for some reason the bindings are not generated.
Everything works fine if I write:
However, if I try to use the standard syntax:
I get a
Uncaught ReferenceError: DIContainer could not get service: No arguments were given!
for theregisterSingleton
calls and aUncaught ReferenceError: DIContainer could not get service: No options was given!
for theget
call.Do you have any idea of what is wrong or what is missing?
To make the integration work, I use
parcel-plugin-ttypescript
that enables me to specify some TS transformers in thetsconfig.json
file. After that, I needed to make a small adapter between this parcel plugin and di-compiler:I created a repository with a minimal project to reproduce the issue: https://github.com/amanteaux/poc-parcel-di-compiler
The two ways of writing the bindings are in
src/index.ts
.Thank you for any help/hints to make the integration works!
Cheers
The text was updated successfully, but these errors were encountered: