Skip to content
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

webpack usage #11

Open
bazo opened this issue May 8, 2015 · 1 comment
Open

webpack usage #11

bazo opened this issue May 8, 2015 · 1 comment

Comments

@bazo
Copy link

bazo commented May 8, 2015

hi,

i don't know if this lib is developed any more,but i would like to use it with webpack in browser. but i'm having a problem passing the configuration file to the Configuration or DIFactory factories as webpack complains that it cannot find module config.json. logically as it is not in node_modules

then i tried a little hack

configuration.data = configuration.parse(config); where config is js object - the config file. i cant pass in json as string because webpack needs to load and resolve everything

so i get this error Error: Found section services but there is no coresponding extension.

now i have no idea how to hack this further

do you have any ideas how to use di with webpack?

@davidkudera
Copy link
Member

Hello and sorry for late response..

I'm currently not using this package in any website so there was no reason for me to update it. Also it deserves some major refactoring (with configuration package as well) with some catch up with nette's di...

I looked at your problem and basically result from these lines of code in configuration package will need to be put in class property, which anyone can overwrite with custom configuration data.

DI package does not need any change for that to work (I hope), because you can already use custom Configuration instances. See test.

Do you want to create PR? I could do that probably at this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants