Static GitHub Issues

[68] Prefetch plugin data

prev: nuxt connecting to graphql apollo client
next: pm2 run nuxt

I created my custom translation plugin in which I extend Vue.

// Trans class here...

const translations = {}; // Need to fetch this json obj from server here

Vue.prototype._ = (key, params = {}) => {
  return trans.get(key, params);
};

How can I prefetch it so Vue can use it? Thanks!

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c52">#c52</a>)</em></sub></div>