An esbuild plugin that loads Lingui message catalogs from .po files, enabling seamless integration with Lingui internationalization. Current version 1.0.1, stable. Converts .po files to JavaScript modules at build time, reducing runtime overhead. Supports TypeScript types. There are few alternatives; this fills a specific niche for Lingui users on esbuild.
npm install esbuild-plugin-lingui-po-loaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin with esbuild to automatically load .po files during the build.
Convert .mo files to .po using tools like msgfmt --text --output-file messages.po messages.mo.
Use the 'onRebuild' option in esbuild's watch mode to clear cache or re-run the plugin.
Ensure the plugin is added to the plugins array: build({ plugins: [linguiPoLoader()] }).Install the package: npm install esbuild-plugin-lingui-po-loader (or bun add, yarn add, etc.).