You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build and deploy a Vue 3, Vite, TypeScript project in an NX monorepo to serverless. However, despite running the production deployment command yarn nx run x-dashboard:deploy:production --no-cloud, NX still builds the project using the development configuration.
As a result, it uses the .env.development file instead of .env.production, which leads to incorrect environment variables (such as API paths) being set for the production build.
Expected Behavior
When running the deploy:production target, NX should use the production configuration, specifically reading from the .env.production file and building the project accordingly (with mode: production).
GitHub Repo
Unfortunately, this issue cannot be reproduced in the default https://github.com/nrwl/nx-examples repo as it's a custom configuration, but I am happy to provide more specific details from my project configuration if necessary.
Steps to Reproduce
Create a Vue 3, Vite, TypeScript project inside an NX monorepo.
Set up project.json with the following build and deploy configurations (as mentioned below):
Run yarn nx run x-dashboard:deploy:production --no-cloud and notice that the build still uses the development mode and environment variables from .env.development.
Current Behavior
I am trying to build and deploy a Vue 3, Vite, TypeScript project in an NX monorepo to serverless. However, despite running the production deployment command
yarn nx run x-dashboard:deploy:production --no-cloud
, NX still builds the project using thedevelopment
configuration.As a result, it uses the
.env.development
file instead of.env.production
, which leads to incorrect environment variables (such as API paths) being set for the production build.Expected Behavior
When running the
deploy:production
target, NX should use the production configuration, specifically reading from the.env.production
file and building the project accordingly (withmode: production
).GitHub Repo
Unfortunately, this issue cannot be reproduced in the default https://github.com/nrwl/nx-examples repo as it's a custom configuration, but I am happy to provide more specific details from my project configuration if necessary.
Steps to Reproduce
yarn nx run x-dashboard:deploy:production --no-cloud
and notice that the build still uses the development mode and environment variables from.env.development
.Nx Report
Failure Logs
No response
Package Manager Version
1.22.22
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: