Quasar App Extension dotenv
@quasar/quasar-app-extension-dotenv is an official
Quasar CLI App Extension for the popular dotenv package.
quasar ext add @quasar/dotenv
Quasar CLI will retrieve it from NPM and install the extension.
"What is the name of your .env that you will be using for development builds?" The default is ".env"
"What name would you like to use for your Common Root Object ('none' means to not use one)?" The default is "none" The "common root object" means off of "process.env" you will have a named object, basically for organization purposes.
"Create your .env files for you?" The default is "true" (yes) If you say "yes" to this question, then your .env files will be automatically created for you.
"For security, would you like your .env files automatically added to .gitignore?" The default is "true" (yes) If you say "yes" to this question, then your .env files will automatically be inserted into the .gitignore. For security purposes, because you may have sensitive data in your .env file, you should not keep it in a repository.
Any data in a
.env will be placed in
process.env at the browser level.
If you specified a common root object, say
MyData, then the data will be placed at
If you have this:
Then it will be accessible via
process.env.APP_PORT or if you have a common root object of
MyData then it will be
Note: For security reasons, you cannot
console.log(process.env). Quasar does this to enhance your own security.
quasar ext remove @quasar/dotenv
MIT (c) Jeff Galbraith email@example.com