Closed bruceauyeung closed 5 years ago
problem solved if manually specifying ids, to be specific:
container.addSingleton<IAnotherWorkerService>(AnotherWorkerService,Types.IAnotherWorkerService);
@inject(Types.IAnotherWorkerService) workerService2!:IAnotherWorkerService;
Types.IAnotherWorkerService
is the id manually specified.
but i don't understand why, maybe my codes are uglified somehow i don't notice yet ? expecting explanations.
finally i figured out what's the root cause why @inject()
doesn't work. it's because my project is created by vue create
and vue add electron-builder
, and codes are uglified by terser by default. i have already figured out how to enable keep_classnames
and keep_fnames
.
thanks for this wonderful easy-to-use library!
Wow I've just discover all this comments, I think that your issue can help to #5 mmm seems related. How do you think that I can improve my docs to understand better how this works? @bruceauyeung
i am writing a simple electron + vue + typescript app. when debugging in vscode ( which attaches to webpack debugger server), inversify-props works without problem. i can get the result as expected.
but when i run
electron-vue-ts-element.exe --enable-logging
(excutable binaryelectron-vue-ts-element.exe
is generated byyarn electron:build
), that error is printed in stderr.two dependency chains:
inversify-props: "^1.4.3"