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

Problem with the array-typed values of config #4

Open
davidmz opened this issue Oct 18, 2019 · 1 comment
Open

Problem with the array-typed values of config #4

davidmz opened this issue Oct 18, 2019 · 1 comment

Comments

@davidmz
Copy link

davidmz commented Oct 18, 2019

If my config have array values:

{
  "validNames": ["one", "two", "three"]
}

then the CONFIG created by node-config-webpack looks like:

{
  "validNames": {0: "one", 1: "two", 2: "three"}
}

This is ok while we use the separate items of array (like CONFIG.validNames[0]) but it prevents us from using array at whole, for example like CONFIG.validNames.includes(name).

@SassNinja
Copy link

The reason is this plugin uses webpack's DefinePlugin under the hood what has this issue

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