I am creating a node js application as a Contentful UI Extension. The code is hosted here: https://github.com/doodybrains/media-tagging-extension
A lot of the gulp file is boiler plate but in the end everything gets bundled into an index.html
file. I know that env variables shouldn't be called or processed in the client code but I don't know how to get them in there before the project is built. When I run the repo in development and call process.env.NAME_OF_TOKEN
from src/index.js
it returns undefined
. I have tried import dotenv, creating a gulp env pipeline etc.
ANY ADVICE will be so helpful. The app is being deployed to Netlify and I already have the env variables set up there as well.
thank you