I am building an Vue3 app that was giving me the error “Uncaught ReferenceError: global is not defined” when I was trying to import packages (in this case aws-sdk)
In order to solve this I added window.global ||=window in the script tag in the index.html file which solved the problem.
Though when trying to access secret variables (ie process.env[“VUE_APP_AWS_ACCESS_KEY”]) in my app I now get the error “Uncaught ReferenceError: process is not defined”
How to solve this? How can I access the secret variables?