mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Next.js compliant command for production builds (#2219)
* feat: Vercel compliant command for prod builds * feat: simplify to a single command, rename command Also included the script to download assets. * fix: exclude vercel injected env vars Vercel injects a number of environment variables, that in some cases can result in run time errors when the app is reading from envs.js. Exclude these.
This commit is contained in:
@@ -18,6 +18,12 @@ echo "window.__envs = {" >> $output_file;
|
||||
|
||||
# Iterate through all environment variables
|
||||
for var in $(env | grep '^NEXT_PUBLIC_' | cut -d= -f1); do
|
||||
# Skip variables that start with NEXT_PUBLIC_VERCEL. Vercel injects these
|
||||
# and they can cause runtime errors, particularly when commit messages wrap lines.
|
||||
if [[ $var == NEXT_PUBLIC_VERCEL* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Get the value of the variable
|
||||
value="${!var}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user