Skip to content
Advertisement

Tag: environment-variables

Getting environment variables to work in next js and netlify

I have deployed a next js application to netlify using git and I have a .env.local file that stores the backend route url that I use everywhere throughout the app when making fetch requests. The problem is that after deployment the process.env.NEXT_PUBLIC_BACKEND_ROUTE returns undefined. The .env.local file: NEXT_PUBLIC_BACKEND_ROUTE=https://[the name of the url].herokuapp.com/ An example of a page using the environment

Passing NODE_ENV into the npm script for Windows 10

I am using webpack in a Typescript project. I am following a tutorial where I have created 3 webpack files: webpack.common.js webpack.production.js webpack.development.js Within the tutorial’s package.json the “scripts” seconds have the following: I have been looking into the following SE Query to set the NODE_ENV for Windows 10. Where within PowerShell I perform: However once I execute npm run

Advertisement