Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Env with same name is serialized #613

Closed
jolafrite opened this issue Jul 17, 2018 · 5 comments
Closed

Env with same name is serialized #613

jolafrite opened this issue Jul 17, 2018 · 5 comments

Comments

@jolafrite
Copy link
Contributor

jolafrite commented Jul 17, 2018

Hi

when using tns run ios --bundle --env.aot --env.aot=false
The aot value will be in the hookArgs available as an array [true, false]
But in webpack.config.js it becomes true,false

The problem is coming form this line of code:

return envFlagNames.map(item => `--env.${item}=${envData[item]}`);

Maybe we can change the line with something like:

const args = [];
envFlagNames.map(item => {
    let value = envData[item];
    if(!Array.isArray(value)) {
        value = [value];
    }
    value.map(value => args.push(`--env.${item}=${value}`))
});

return args;
@sis0k0
Copy link
Contributor

sis0k0 commented Jul 17, 2018

Sounds good! Do you want to make a PR with the change?

@jolafrite
Copy link
Contributor Author

sure

@jolafrite
Copy link
Contributor Author

sent

@sis0k0
Copy link
Contributor

sis0k0 commented Jul 17, 2018

10x!

@sis0k0
Copy link
Contributor

sis0k0 commented Jul 23, 2018

The issue was fixed with #614 and will be released in the next version of the plugin. Thanks, @jolafrite!

@sis0k0 sis0k0 closed this as completed Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants