title: How to access current route meta fields in common javascript module - VueJs
body: <p>I have following route in my application:</p>
  <pre class="lang-js prettyprint-override"><code>const router = new Router({
    mode: 'history',
    scrollBehavior: () =&gt; ({ y: 0 }),
    routes: [
      { path: '/', component: HomePage, meta: { pageType: 'home'} },
    ],
  });
  </code></pre>
  <p>and have on common js module:</p>
  <pre class="lang-js prettyprint-override"><code>const trackEvent = {
    getFields: () =&gt; {
    //here need to access meta fields(pageType) of current route. how is it possible ?
    }
  }
  export default trackEvent;
  </code></pre>
  <p>i want to access meta field in common module. how is it possible ?</p>