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
Deferred values can't be referenced by sub-modules #687
Comments
I have not looked closely to see if this possible to implement. You can submit a PR to find out what's involved and we can discuss any trade-offs from there. I don't think anyone else is going to implement this for you, though. |
In your example, did you also test with I'm not sure this issue can be resolved without perhaps a re-design that introduces some incompatibilities. See for example the proposal in #569. |
I'm submitting a ...
What is the current behavior?
Sub-modules that use node-config are not able to reference
deferred
values from the parent module.For example, say you have a
parent
module withnode-config
installed and two config files,default
andproduction
.default.js
production.js
index.js
This correctly prints the full name,
Jane Doe
.However, say I also have a
sub-module
with the following index filechild - index.js
Then I update the
parent module
index file to the following to require the child module.parent - index.js
The output is then:
Which you can see that the config values correctly resolve the values in the
parent
module. But in thesub-module
it does not resolve.What is the expected behavior?
Based on the wiki, I would expect that
config-defer
should work with sub modules as well and I should see "Jane Doe" in the sub module index file (I haven't read anything that stated otherwise).Please tell us about your environment:
Other information
The text was updated successfully, but these errors were encountered: