Status: Closed (View Workflow)
Affects Version/s: None
Fix Version/s: None
Sprint:stripes-force 107, stripes-force 108, stripes-force 110, stripes-force 111
Development Team:Stripes Force
[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
For more details see https://formatjs.io/docs/getting-started/message-distribution
Compiling the messages is easy, but there's a bit of grunt work to configure it all correctly that, should be centralized into stripes-cli so it can be managed automatically as part of the stripes build command. We'll also need to update stripes-core to use the pre-compiled files when they are available and to fall back to the current, uncompiled files when they are not available.
For an individual repository for an individual locale, the steps looks like this:
- add @formatjs/cli as a dev-dep
- add a translation-compilation hook to the package.json scripts section, e.g. "formatjs-compile": "formatjs compile"
- provide a formatter (our translation-file syntax exactly matches the required output syntax, so this is dead simple):
- parse the translations for each locale:
- update Jenkinsfile so compilation and testing are both handled by runScripts, in order: