Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
How to display specific DOM only in local?

.env

APP_ENV=local


data() {
        return {
            appEnv: process.env.APP_ENV,

only for local set up, I want to display this debugging section.

<v-col v-if="appEnv == 'local'" cols="6" sm="6" md="9">{{ urlGroups }} </v-col>

I see no error on console, but I also see nothing render from {{appEnv}}

What did I miss ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Using a condition in DOM is indirect and unreliable way to debug. Instead process.env.APP_ENV needs to be debugged directly, preferably with a breakpoint.

If it's Vue CLI setup that is used to use .env files then the problem is APP_ENV is not available for browser and it could be debugged that it's undefined.

As the documentation states, custom environment variables should have VUE_APP_ prefix in order to be available in browser. It should be:

VUE_APP_ENV=local

and accessed like process.env.APP_ENV in Vue app.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!