-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(build): import Flatpickr Locale on demand via regular imports #227
Conversation
ghiscoding
commented
Jan 5, 2021
- we shouldn't use require(locale) because they all end up being part of the final bundle, it's better to let the user import whichever Flatpickr Locale he wants to use and that will end up being a much smaller bundle with only the locale we really need
- we shouldn't use require(locale) because they all end up being part of the final bundle, it's better to let the user import whichever Flatpickr Locale he wants to use and that will end up being a much smaller bundle with only the locale we really need
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 207 207
Lines 11847 11829 -18
Branches 4064 4058 -6
=========================================
- Hits 11847 11829 -18
Continue to review full report at Codecov.
|
This is definitely a better approach since you aint really gonna need all locales bundled all the time. Tbh this actually is a breaking change, because users depending on a different language would now have to touch code as their CI/Tests might break. It feels relatively small but essentially it still is one ;) dunno If you just want to document this which might be enough given the en fallback |
hmm yeah it might be a small breaking change but I certainly won't do a version 4.x lol |
Well you asked me and you got an answer ;) |
haha I do appreciate your feedback since you're a big user of the lib 😉 |