Where to put .env file in CMS-React-Boilderplate?SOLVE
Feb 22, 2021 12:43 AM - edited Feb 22, 2021 12:54 PM
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.
Feb 22, 2021 1:19 PM
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.