Replies: 2 comments
-
Im currently stuck in this part. @Rc85 Did you figure out how to setup a custom staging environment? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the feature you'd like to request
I would like to have the option to set the
.env
to use when runningnext build
. The reason is that I want to build my app on my machine before deploying to my VPS to save the hassle of uploading all the unnecessary files (eg. typescript files) to VPS. On my VPS, I have two environments, staging and production. Building the staging environment app on my machine using.env.development
will reduce a lot of uploading time and resources.OS: Windows 10 Pro
NextJS: 12.3.1
Node: 16.15.0
When I set
NODE_ENV
the non standard way, it is ignored.Describe the solution you'd like
Implement an option when running
next build
such as--env development
.Describe alternatives you've considered
Use
NEXT_ENV
to determine which.env
file to load so it doesn't interfere withNODE_ENV
.Beta Was this translation helpful? Give feedback.
All reactions