When I use like dayjs(date).locale('te').format('YYYY MMM DD')
, then I get Month value in english. For working with locale, I have to import locale.
import * as locale from 'dayjs/locale/te';
The problem is that I don't see a way to dynamically import a locale. I don't have access to nodejs require() function. I have react based application. How to mitigate this issue?