mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
cb18aa6f53
After #3564 and the request of #3427 (plus #3452) I decided to add a dedicated `vueConfig`object to the `nuxt.config.js` file. The keys will be projected on Vue.config. By default, `Vue.config.performance` is enabled in dev mode, `Vue.config.silent` is enabled in production mode. Doc PR incoming. Resolves: #2910, #3427
28 lines
495 B
Vue
28 lines
495 B
Vue
<template>
|
|
<div>
|
|
<span v-for="(key, i) in configKeys" :id="key" :key="i">{{ vueConfig[key] | toStr }}</span>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Vue from 'vue'
|
|
|
|
export default {
|
|
filters: {
|
|
toStr(v) {
|
|
return String(v)
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
vueConfig: Vue.config
|
|
}
|
|
},
|
|
computed: {
|
|
configKeys: function () {
|
|
return Object.keys(this.vueConfig).filter(k => ['silent', 'devtools', 'performance', 'productTip'].includes(k))
|
|
}
|
|
}
|
|
}
|
|
</script>
|