Skip to content
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

[Feature request] Expand pick and omit functionality #170

Open
ilyakamens opened this issue Sep 22, 2020 · 3 comments
Open

[Feature request] Expand pick and omit functionality #170

ilyakamens opened this issue Sep 22, 2020 · 3 comments

Comments

@ilyakamens
Copy link

Hi @commenthol,

Thanks for this great tool. I'd like to submit a feature request to expand the pick and omit functionality when making a custom build. Specifically:

  • Add the ability to pick only certain US states (e.g., only pick holiday information for US + TX, and omit the other state-specific holidays).
  • Add the ability to omit the holiday names in other languages (or to pick certain languages).

I use this library to automatically display custom support / CX hours during my company's holidays. Even with the custom build (holidays2json --pick US --min), it adds 350KiB (80KiB zipped) to our bundle, which is quite a bit (it's the second-largest bundle in our app).

Thank you for your consideration.

- Ilya

@ilyakamens
Copy link
Author

Edit: I wrote a script to accomplish the above that omits all languages except English and removes all US state holidays except TX's, but the bundle is still quite large at 70KiB zipped.

I see the Bundling with webpack section and webpack.config.js, but it's still not clear to me how to make use of that to further reduce bundle size. Any additional information would be appreciated.

@commenthol
Copy link
Owner

Hi @ilyakamens,
I think you are doing everything right. Problem is that moment-timezone latest.json data still has ~180kB.
If you only leave the required timezones in this would reduce the size further.
Nonetheless there is still no reliable replacement to use correct timezones in the browser, which then would allow to remove the moment-timezone dependency.

@pzien
Copy link

pzien commented May 12, 2022

Great library! But would it be possible to remove the moment-timezone dependency?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants