Hi all,
in the new JS API version 4.18, we are using the new way to translate custom widgets by using the new decorator in the tsx files e.g.
@messageBundle("gis/commonMessages")
Most of the times it is working, including multiple JSON files with different names but some times when we destroy the widget and recreate it, it cannot find the loader.
In other cases we cannot use this decorator and we need to use the method fetchMessageBundle to get our messages. So we do something like this await intl.fetchMessageBundle("gis/widgetMessages").then((messages: any) => {})
In both use cases, the JSON is accessible from the site, and the JSONloader is correctly loaded, but we receive the error message there is no loader for these messages.
We try to debug a bit, and there is a weird behavior with a regex query when it tries to find the loader. The first time it tries to find the loader it returns false, the second it returns true, the third it returns false the fourth true etc etc.
We suspect it is a bug, ooor we are doing something wrong 😁.
Please let us know about any feedback!