You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.
I find this page is very useful and there's an easy workaround for adapting the if (DEV) statement into v0.15.8 and wanted to share it with the community:
Old method:
someFunction() {
if (DEV) {
console.log('DEV!)
}
// Alternatively: if (PROD) ...
}
New method:
someFunction() {
if (process.env.DEV) {
console.log('DEV!)
}
// Alternatively: if (process.env.PROD) ...
}
You can also use this flag in the <template> area with v-if/v-show by binding it to a variable in your data property:
<template>
<div>
<span v-if="isDev">This is the DEV environment</span>
<span v-if="!isDev">This is the PROD environment</span>
</div>
</template>
export default {
data () {
return {
isDev: process.env.DEV
}
}
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Quasar: v0.15.6
Browsers: Any
Any other software related to your bug:
What did you get as the error?
No error, this is a request to bring back the DEV vs Prod documentation page found on old quasar releases (http://v0-14.quasar-framework.org/guide/app-dev-vs-production-code.html)
What were you expecting?
I find this page is very useful and there's an easy workaround for adapting the
if (DEV)
statement into v0.15.8 and wanted to share it with the community:Old method:
New method:
You can also use this flag in the
<template>
area with v-if/v-show by binding it to a variable in your data property:The text was updated successfully, but these errors were encountered: