Does NODE_ENV affect build environment or only for runtime environment

Effectively yes because the build is static and it’s react CSR meaning the “address” to the Strapi backend needs to be compiled into the static generated files, after the admin is built then the Strapi backend is just acting as basically a webserver that is serving those static files.

The client side loads the files and makes requests using the compiled URL and it needs to know the backend address to do that.

1 Like