Unable to access Vue instance properties in asyncData
[issue link]Using the instance properties approach in a plugin, and after registering that plugin in nuxt.config.js, I’m unable to access those properties in asyncData:
export default {
async asyncData({ app }) {
console.log(app.$myVar); // === undefined
return {};
}
}
Probably related, I can’t access any $variables on app. Here is what app consists of:
// console.log(Object.keys(app));
[ 'router',
'store',
'_nuxt',
'head',
'data',
'beforeCreate',
'created',
'mounted',
'watch',
'methods',
'components',
'render',
'staticRenderFns',
'_ssrRegister',
'__file' ]
But of course, the context docs say I should be able to.
The root vue instance that includes all your plugins. For example, when using axios, you can get access to axios