Pick required language only.
See original GitHub issueI was surprised that all the languages are inside my js bundle.
It would be great to have English by default and load additional language when Validator.useLang(...)
triggered.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:13 (4 by maintainers)
Top Results From Across the Web
How to pick a programming language - John Mosesman
You're just starting out. You want to learn how to program and become a developer, and you're trying to pick a language.
Read more >Change your language on Google - Android
On your Android phone or tablet, go to the Search settings page. Choose your language settings. Language in Google products: This setting changes...
Read more >Setting language preferences in a browser - W3C
Under the Languages heading, choose your preferred language(s) by selecting the language or language+region combination you want from the list ...
Read more >Turn on automatic language detection - Microsoft Support
Open Edit > Language > select Language. Review the languages shown above the double line in the Mark selected text as list. Office...
Read more >Documentation - Utility Types - TypeScript
Constructs a type consisting of all properties of Type set to required. ... Constructs a type by picking the set of properties Keys...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A workaround for those in the same shoe: use webpack
IgnorePlugin
to include only the necessary language file. For example, to include English only, add the line towebpack
configuration file:new webpack.IgnorePlugin(/^\.\/(?!en)(.+)$/, /validatorjs\/src\/lang/),
I run into the same problem, in that in the final bundle, about 7.6K gzipped is taken up by these unused language files:
Does anyone have any clue how to exclude the files from being included? I am using
webpack2
for packaging.