- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Where to put .env file in CMS-React-Boilderplate?
SOLVEMonday - 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Accepted Solutions
Monday
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content