Open yulodl opened 2 years ago
@jsmreese Any updates on if this will be merged and released? Trying really hard to figure out how to get around this issue with modern tooling like vite but cannot figure it out. I've confirmed this does fix the issue I was having.
I've created a fork that can be installed in place of this library in case anyone is having issues:
https://github.com/sethreidnz/moment-duration-format
npm install sethreidnz/moment-duration-format
I can't express how thankful I am. This has solved my entire problem.
For everyone using Vite and encountering an issue like "TypeError: moment is not a function," this will fix it.
This solution works for both development and production builds.
ref: https://github.com/moment/moment-timezone/blob/develop/moment-timezone.js#L21