Load .env in new project #17906
Unanswered
roylans
asked this question in
General - Components / Directives / etc
Replies: 1 comment
-
|
Are you using @quasar/app-vite? If you do, you don't need dotenv: https://vite.dev/guide/env-and-mode.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’ve been working with Quasar for several years and have never had issues with .env files. However, since yesterday, I started a new project, and I can’t get the environment variables to load correctly.
Steps I followed:
1. Created a new Quasar project.
2. Installed dotenv.
3. Created the src/.env file.
4. Tried accessing the environment variables from a component, but they won’t load.
I’ve tried several solutions with no success. I’d appreciate any guidance or suggestions to resolve this issue.
This is my package.json:
This is my quasar.conf.ts
And this is my console
I’ve tried several solutions with no success. I would really appreciate your help with this issue.
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions