Problem
The current custom formatter API does not allow me to import my runtime module with locale awareness.
Current:
export const phone: CustomFormatter = {
// ...snip
module: '@messageformat/phone'
};
Desired:
export const phone: CustomFormatter = {
// ...snip
module: (localeCode) => `@messageformat/phone/${localeCode}` // e.g. "@messageformat/phone/mx"
};
Discussion
In this respect, the generated ESM javascript can use much smaller implementations for the compilation of interest!