A
Alokai•2y ago
ajaykrmahato

Fetch .env variables in .vue files

Hello everyone , I am trying to fetch an .env variable in "modules/checkout/components/VsfPaymentProvider.vue" but "process.env.SOME_KEY" is not working for me , which is the default way to access env in .vue files .
2 Replies
skirianov
skirianov•2y ago
Hi 👋 This is a Nuxt.js thing and I couldn’t find anything in their docs, but take a look at this answer it may help https://stackoverflow.com/a/67705541
Stack Overflow
How to use .env variables in Nuxt 2 or 3?
I have .env file in the project root, and in my nuxt config I am using variables to configure ReCaptcha like this: import dotenv from 'dotenv' dotenv.config() export default { modules: [ ...
ajaykrmahato
ajaykrmahatoOP•2y ago
Thanks , I will have a look into this .
Want results from more Discord servers?
Add your server