React Uncaught ReferenceError: process is not defined?

Viewed 17

My app in react.ts contains the .env file to store variables with confidential data. But when using process.env.REACT_APP_CLIENT_ID an error appears in the console (Uncaught ReferenceError: process is not defined). How to solve? Help me please.

enter image description here

.env file

REACT_APP_CLIENT_ID = ed75ba30-1810

Code

export const msalConfig: Configuration = {
auth: {
    clientId: process.env.REACT_APP_CLIENT_ID,
    authority: "https://login.microsoftonline.com,
},
0 Answers
Related