intlify / intlify/bundle-tools

Minimize keys

Open
#502 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
270
Forks
46
PR merge metrics
No merged PRs in 30d

Description

### Clear and concise description of the problem

Currently, JSON files contain human-centric, verbose and developer-friendly keys. This is great for development, but in production this is a lot of bytes.

### Suggested solution

During bundling, those keys could be minimized into unique short key names. I think this could be done with simple find/replace based on names found in language JSON files, like if there is `{"my":{"message": "x"}}` tool could search for `[\b$]t("my.message"` string and replace it.

### Alternative

Use cryptic and short key names during development itself.

### Additional context

_No response_

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/intlify/bundle-tools/blob/main/CONTRIBUTING.md).
- [x] Read the README
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.