Where to put .env file in CMS-React-Boilderplate?SOLVE
Monday - last edited Monday
I am working with a custom version of CMS-React-Boilderplate and I'm having a hard time accessing any .env variables. I've created a `.env` file in my root directory and I have tried access it with `process.env.REACT_APP_...` without any success. Has anyone had any sucess using a `.env` file with hubspot?
Solved! Go to Solution.
To use process.env you're going to need to use the EnvironmentPlugin, if you want to use .env you'll need to use https://www.npmjs.com/package/dotenv-webpack
I'm guessing you're used to using create-react-app - the CMS React Boilerplate doesn't use CRA.