-
Notifications
You must be signed in to change notification settings - Fork 655
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
Cannot pass "advanced options" to ng
when when running ionic build --engine=cordova
#4329
Comments
@asgeo1 If |
Hi @dwieeb,
I don't fully understand how these builders work yet, but if I work something out I will surely share. However, I'm just trying to understand why the If it did that, then I think it would work the way I was hoping. |
Hmm, I guess just passing the additional argument isn't enough, as I can see that
I guess I'll have to try and understand these builders a bit more... |
With |
Hmm, OK well I'm still looking into it. If I can't work it out I'll just close this ticket off. But I figure I might as well mention what I'm trying to achieve in the first place, in case this is just the wrong way to go about it... The only reason I'm trying to get But I don't care for those environment files much. I would much prefer normal environment variables, that I can set on the command line, or exported in the shell, that are then referenced in my angular code via i.e. Normally this easy to setup (if you have access to the webpack config), and can then use any of the If anyone has any other ideas, let me know. |
I've come up with a solution actually, based on this blog post: https://medium.com/@ferie/how-to-pass-environment-variables-at-building-time-in-an-angular-application-using-env-files-4ae1a80383c Basically you create a node script, which will dynamically generate I guess I'll close this off then, thanks for your help. |
Description:
I am trying to use the
ngx-build-plus
package, so I can customise the webpack.config.js used by Ionic/Angular when builds are created.It does work when I run the build command like this:
And I can see in the console, that it then calls the
ng
CLI like so, passing along the--extra-webpack-config
argument:However, if I want to build for cordova then I also need the
--engine=cordova
argument. So I call it again:But now the
--extra-webpack-config
option is no longer passed tong
...Why is that? Is there any workaround, or can this be fixed?
My
ionic info
:The text was updated successfully, but these errors were encountered: