The path is useless for web apps. Renaming the prop to name makes more sense and doesn't require deriving the path from the settings.
toBeImportedFiles should then probably also be localPathPattern to account for both im- and export.
return Object.entries(result).map(([locale, messages]) => ({
locale,
content: new TextEncoder().encode(JSON.stringify(unflatten(messages), undefined, "\t") + "\n"),
// TODO the path should be configurable
path: `mock/${locale}.json`,
The path is useless for web apps. Renaming the prop to
name
makes more sense and doesn't require deriving the path from the settings.toBeImportedFiles
should then probably also belocalPathPattern
to account for both im- and export.