title: Context is undefined in translation module
body: <p>I tried to add a call to an endpoint in order to get translation. I have like this :</p>
  <pre><code>const loadLocales = async () =&gt; {
  const context = require.context('./locales', true);
  const data = await ApiService.post(`${translationToolUrl}/gateway/translations`, { project: 'myProject' });
  const messages = context.keys()
  .map((key) =&gt; ({ key, locale: key.match(/[-a-z0-9_]+/i)[0] }))
  .reduce((msgs, { key, locale }) =&gt; ({
    ...msgs,
    [locale]: extendMessages(context(key)),
  }), {});
  return { context, messages };
  };
  
  const { context, messages } = loadLocales();
  
  i18n = new VueI18n({
     locale: 'en',
     fallbackLocale: 'en',
     silentFallbackWarn: true,
     messages,  
  });
  
  if (module.hot) {
    module.hot.accept(context.id, () =&gt; {
    const { messages: newMessages } = loadLocales();
    Object.keys(newMessages)
      .filter((locale) =&gt; messages[locale] !== extendMessages(newMessages[locale]))
      .forEach((locale) =&gt; {
         const msgs = extendMessages(newMessages[locale]);
         messages[locale] = msgs;
         i18n.setLocaleMessage(locale, msgs);
       });
    });
    }
  </code></pre>
  <p>I added this request : <code>ApiService.post</code>. But I have the error <code>TypeError: context is undefined</code> droped at this line <code>module.hot.accept(context.id...</code>. Have you an idea how I can solve that ? My scope was to add this request in order to get translations from database and from .json files for now. I want to do a merge between both for now, in the feature I will get only from database but this will be done step by step.</p>