Sorry if this is a basic question, but how do we use .env in `ui.frontend` for a deployed instance?
In my local AEM Cloud project, I have an .env file in my `ui.frontend` module's root folder, and my webpack.common.js file loads that .env file per below, so I can access them in my `ui.frontend` javascript files using `process.env.API_KEY`.
const Dotenv = require("dotenv-webpack");
//...
plugins: [
new Dotenv(),
//...
]
Of course, I am not including the .env file when pushing and deploying, so I need to set them in the deployment configuration.
I know I can set the env variables as part of the configuration at per Adobe doc here. But I am not sure how to access it in my ui.frontend javascript as it only mentions accessing it via XML, or if this is the proper way.