Skip to content

Instantly share code, notes, and snippets.

@suiluj
Last active May 22, 2021 18:26
Show Gist options
  • Save suiluj/9ffd17934ab96ee7a682b95c1432f57d to your computer and use it in GitHub Desktop.
Save suiluj/9ffd17934ab96ee7a682b95c1432f57d to your computer and use it in GitHub Desktop.
quasar env file dev and production environment (production with environment variables not from file) dotenv

install dotenv package:

npm install --save dotenv

file: quasar.conf.js

build: {
      vueRouterMode: 'hash', // available values: 'hash', 'history'
      env: (process.env.NODE_ENV === "development") ? require('dotenv').config().parsed : {TEST: process.env.TEST},
      ..
      ..
      ..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment