Ionic CLI build parameters issue with Vue?

Hi there

We’re using Ionic 5 with Vue 3, but there is an issue with the Ionic CLI tooling in regards to Vue.

On the Ionic CLI documentation page it is stated that all “–” parameters are passed to the underlying build tool, depending on what project type you’re running (angular, vue, react…).

Now, we have several environments / configurations specified for our project, but I’m unable to get ionic build to build any other environment besides production?

For example, to build in sandbox environment mode, I would assume either of these commands to work:

ionic build --mode=sandbox
ionic build --configuration=sandbox

But both of these just build with production variables…?

If I call the underlying vue-cli-service explicitly with a --mode, it builds as expected:

npx vue-cli-service build --mode=sandbox

So it seems like ionic build is not passing the arguments to vue-cli-service ?

The same issue holds true for ionic capacitor copy ios --mode=sandbox.

Any help would be greatly appreciated :wink:

1 Like

Having the same issue. Did you figure out a solution?

We have an issue open for this here: bug: build flags not passed to vue-cli-service · Issue #4642 · ionic-team/ionic-cli · GitHub

Did you ever figure this out? I’m having the same issues with the latest release.