A Babel plugin for transforming intl message usages to obfuscated, minified strings, saving on bundle size and allowing for complete anonymity of string names.
This package is plain CommonJS with JSDoc types that requires no compilation. It can be tested locally by using file:
or link:
references from another project. No build step is required.
This plugin is usable with Babel 7+. There is minimal configuration other than extraImports
for adding additional names to check and transform usages for.
[
[
require('@discord/babel-plugin-transform-discord-intl'),
{
extraImports: {
[path.resolve('some/source/file')]: ['t', 'otherMessagesName'],
},
},
],
];