title: Setting locale in moment.js not working despite using the locale file
body: <p>There is a <code>setLocale</code> method in a dependency of a project, and I call this method from the project on locale change. However, the locale doesn't seem to change.</p>
  
  <pre><code>import moment from 'moment';
  import 'moment/locale/de'; 
  
  export const setLocale = locale =&gt; {
      console.log(`Locale to be set: ${locale}`)
      moment.locale(locale);
      console.log(moment.locale())
  };
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/SK2ur.png" rel="nofollow noreferrer">Output in console</a></p>
  
  <p>I'm using <code>moment-js v2.26.0</code>in the dependency and <code>2.24.0</code> in the main project.</p>
  
  <p>Same happens if I set locale explicitly. </p>
  
  <p>However, changing the locale works in the main project works just fine.</p>