-
Notifications
You must be signed in to change notification settings - Fork 211
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
fileReplacements option is missing in the production build #930
Comments
@bampakoa did you found any workaround? |
@alexkazantsev no I haven't. I am currently running |
Hello everyone, I also ran into this problem lately and I have found a momentary workaround. Workaround:
Also, I would like to resolve this issue, i just forked the repo and will try to fix it asap! |
A quick update, I tried to look into it but couldn't fix it by myself. The problem seems to be in the way the options are passed to the runner: // This is not the real code
const options = {
...getDefaultConfiguration(environment), // This only return directly usable CLI options
...form.value // The form does only contains CLI options
}
const stringOptions = options.map(option => `--${option.label}=${option.value}`)
this.executeCommand(stringOptions); So basically the problme is that @mrmeku i saw that you created much of the ui, do you have any advice? Probably the best thing we could do would be to also pass the configuration flag before everything else so it can be ovverrided by changing the values of the form. |
When I execute a production build in an Angular project, Angular Console states that it will run
ng build --prod
but internally it executes the command, passing the configuration options of the production one by one. Unfortunately, this does not take into accountfileReplacements
array so I end up with a not so real production version of my app because environment files will not be correctly replaced.The text was updated successfully, but these errors were encountered: