optimize output for production bundles #90
ivanhofer
started this conversation in
Optimizations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you use keyed arguments inside your translations e.g.
HI: Hello {name}!
, the function to translate that message will also need to pass an object with the propertyname
in it. It sure is more readable than passing index-based arguments, but it needs more characters. Depending of the amount and the length of the argument-property it will have a negative inpact on the generated bundle-size.We could automatically rewrite arguments for production
if you have a translation like this:
and use it inside your code like:
it could be optimize to the following code:
Also the keys itself can be minified e.g. from
'HI'
to'a'
What needs to be done:
Beta Was this translation helpful? Give feedback.
All reactions