This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
optimize output for production bundles #15
Labels
help wanted
Extra attention is needed
optimization
Things that could reduce bundle-size or make it more efficient
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:
The text was updated successfully, but these errors were encountered: