0👍
For me I was using the quasar framework with Vuejs.
So i added an ext :-
- quasar ext add @quasar/dotenv : This will add extension for quasar dot env.
- enter the details asked in CMD like name of file and filename for dev and prod.
- After setting all these :-
I simply copy pasted all the required variables in .development.env like :-
API_URL = https.. - After that I can access it using process.env.API_URL.
Link for reference : https://www.youtube.com/watch?v=SR_2vbTlF78
If someone is working with other framework they can take reference from here :
Source:stackexchange.com