Here is a deployment. Does anyone know how to make NODE_ENV production during the buildpack run process?
I’ve been wondering this myself too.
NODE_ENV=production fly deploy but it didn’t work.
You might try the suggestions in the official Buildpack docs and set one of these:
On Fly, the way to set these is via
fly.toml build arguments or on the command line.
Where would those be set exactly?
Another issue is I am using PnPM.
You can put on your fly.toml like this:
app = "your-app-name" [build.args] NODE_ENV = "production"
Then the deployed image will recognize NODE_ENV during build time too
Sorry, seeing now that was mentioned before.