Vue build for specific mode is ignored if using lerna run

Viewed 10

So I have a vue project with this script in the package.json:

"build-test": "vue-cli-service build --mode test"

In the project, I have .env and .env.test files.
Now, everything used to work fine, when I build using the "build-test",
it results in the .env.test configuration as it supposed to

Now, the problem started when I added lerna to the project.
I tried to add a script in the main package.json which basically calls:

lerna run build-test --scope @company/web-app --include-dependencies

But when I do it, it results in getting the configuration from the default .env file and not the .env.test file.

If I run the command "build-test" from the web-app folder, it executes as it should, with the right .env file used.
Anyone has idea what is the problem by any chance?

Thanks In advance

0 Answers
Related