@omnix-lang/metro-plugin
v0.1.1
Published
Metro bundler plugin for Omnix React Native
Readme
@omnix-lang/metro-plugin
Internal — This package is not published to npm. It is used within the Omnix monorepo.
Metro bundler plugin for Omnix React Native builds. Injects the Omnix compiler transformer, virtual route modules, ESM import mapping (.js to .ts/.tsx), and RPC base URL injection at build time.
Import
import { withOmnix, type OmnixMetroOptions } from '@omnix-lang/metro-plugin';Usage (within workspace)
import { withOmnix } from '@omnix-lang/metro-plugin';
const config = withOmnix(metroConfig, {
projectRoot: './',
rpcBaseUrl: 'https://my-api.com',
federation: {
remotes: {
cart: { source: '@my-org/cart-remote', exposes: ['CartWidget'] },
},
},
});The rpcBaseUrl option is required for React Native builds — it is injected at build time as __OMNIX_RPC_BASE_URL__ for RPC transport.
API Reference
API documentation is generated by TypeDoc. Run pnpm docs to generate locally.
