No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. baramofme
    3. Best
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 1
    • Groups 0

    Best posts made by baramofme

    • RE: [V1] A guide for @quasar/dotenv

      @ArkIv That’s good.

      dotenv not working my quasar. so I mixed your method + qenv.

      .quasar.env.json

      {
        "development": {
          "ENV_TYPE": "Running Development",
          "ENV_DEV": "Development",
          "API_URL": "https://dev.some.com"
        },
        "production": {
          "ENV_TYPE": "Running Production",
          "ENV_PROD": "Production",
          "API_URL": "https://some.com"
        },
        "test": {
          "ENV_TYPE": "Running Test",
          "ENV_Test": "Test"
        },
        "stage": {
          "ENV_TYPE": "Running Stage",
          "ENV_STAGE": "Stage",
          "API_URL": "https://stg.some.com"
        }
      }
      
      

      quasar.conf.json

      const configEnv = require('./.quasar.env.json')
      
      module.exports = configure(function (ctx) {
        return {
          ......
                env: {
                   // for settting proxy address with ctx.dev, ctx.prod
                   IS_STAGE: false,
                },
          },
      
          devServer: {
            proxy: {
              // proxy all requests starting with /api to specific url
              '/api': {
                target: ctx.prod ? configEnv["production"].API_URL
                : process.env.IS_STAGE ? configEnv["stage"].API_URL
                    : configEnv["development"].API_URL,
                changeOrigin: true,
                pathRewrite: {
                  '^/api': ''
                }
              },
       
      
      posted in Useful Tips (NEW)
      B
      baramofme