I noticed that when I run npm run dev:rollup I can pull in items from my .env file just fine to connect to my backend API, but when I run npm run build that's not the case. I was able to fix this by adding require('dotenv').config(); to the top of my elder.config.js file. Happy to PR this change to the template, but wanted to check first and see if there's a better way to do this or another reason I'm missing that it's set up the way that it is.
I noticed that when I run
npm run dev:rollup
I can pull in items from my.env
file just fine to connect to my backend API, but when I runnpm run build
that's not the case. I was able to fix this by addingrequire('dotenv').config();
to the top of my elder.config.js file. Happy to PR this change to the template, but wanted to check first and see if there's a better way to do this or another reason I'm missing that it's set up the way that it is.