Skip to content

Development modes

The config dev controls the behavior during development mode and it can be one of the following:

  • false: Disabled, nothing done during development
  • 'read': Only uses existing translations and doesn’t add newly detected messages
  • 'add': Adds newly detected messages and updates their refs as they get referenced, but doesn’t touch existing messages
  • 'refs': Adds new messages, updates refs of all messages and marks obsoletes when no longer referenced
  • 'clean': Full behavior same as npx wuchale --clean, deletes unused messages

HMR support is enabled when the dev mode is enabled (not false) and it supports two directions.

The updates are embedded inside the transformed modules themselves. This way, there is no roundtrip for the catalog updates and a single HMR update holds all the info. Then the new version of the file updates the catalog just before it uses it. And this is independent of how you the catalogs are loaded because the source files update the catalog after getting it, just before using it.

This makes it as if wuchale was never there, while it does its job of extracting and keeping the catalogs up to date, even live translating!

Catalog storage files are not edited as frequently and therefore editing them triggers a full reload instead of small localized updates.