-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A version without built-in locales? #204
Comments
So 3 bundle:
Also should ensure the commonjs has build-in locales. There seems to be no good way? |
I am using ESM so not using the bundles published to npm. Probably, I didn't express it right: I'd like to exclude built-in locales from my bundle not the bundles published by timeago.js to npm. My code is like this:
I guess until the built-in locales are imported for the register function https://github.com/hustcc/timeago.js/blob/master/src/locales.ts#L8 my bundler cannot optimize and strip the built-in locales from my bundle. |
If remove build-in locales in The plan is:
|
Hi!
Thanks for working on the lib and a new version. I am wondering if it's possible to exclude built-in locales (en and ch_ZN) from the bundle. In my use case, I generate code bundles per language and I manually register the correct language in the build process. It'd be good to remove the built-in ones when a different language is used, to reduce the bundle size. Anyway, not a big deal, but what do you think?
Best regards,
Alex
The text was updated successfully, but these errors were encountered: