After we set NODE_ENV in the wrangler dev command such as NODE_ENV=development wrangler dev, the process.env.NODE_ENV in the src/index.ts should be evaluated to "development".
process.env.NODE_ENV is always evaluated to "production" no matter what value we set NODE_ENV to in the wrangler dev command.
- Clone the project.
- Run
pnpm install. - Run
pnpm start. There will be theNODE_ENV: production(which should beNODE_ENV: development) in the Terminal console.