Replies: 3 comments 2 replies
-
What you are looking for is your own environment variable to control the deploy stage of your app, it can be named anything, like |
Beta Was this translation helpful? Give feedback.
-
I am using package.json's script to copy different environment secrets to .env.local based on the command invoked.
I won't say its ideal but get the job done in my case. Keep in mind, |
Beta Was this translation helpful? Give feedback.
-
A new option for this is coming in the next Next release (or maybe the one after depending on how many changes from |
Beta Was this translation helpful? Give feedback.
-
Hi guys. I have three different environments in my project: local development, staging (for QA's), and production. With
next dev
andnext start
everything is ok, but I have a problem because I need to run thenext build
with staging environments.I create three files:
.env.local
,.env.staging
, and.env.production
, but when I run the next build, the production always is called.I created two tasks on
scripts
node onpackage.json
:I created and environment.config.js:
And created the API Service to get data:
But the task
yarn build:hmg
always generates the production build.What I was do wrong?
Regards
Beta Was this translation helpful? Give feedback.
All reactions