There is a setLocale 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.
import moment from 'moment';
import 'moment/locale/de';
export const setLocale = locale => {
console.log(`Locale to be set: ${locale}`)
moment.locale(locale);
console.log(moment.locale())
};
I'm using moment-js v2.26.0in the dependency and 2.24.0 in the main project.
Same happens if I set locale explicitly.
However, changing the locale works in the main project works just fine.