A drop-in replacement minifier for Metro bundler that uses SWC (Speedy Web Compiler) for fast JavaScript minification. Version 1.0.0-alpha is experimental and may not be stable. SWC's Rust-based implementation aims to provide better performance than Metro's default minifier. Requires metro >=0.80.0. Provides TypeScript types.
npm install metro-minify-swcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure Metro's transformer to use metro-minify-swc with custom compress and mangle options.
Pin exact version and monitor releases for breaking changes.
Always provide an empty object if no configuration is needed: minifierConfig: {}.Explicitly set all minifier options in minifierConfig, including defaults.
Verify bundle behavior in development and production environments.
Run npm install --save-dev metro-minify-swc (or yarn/pnpm equivalent).
Ensure the package is installed and check that metro.config.js uses the correct string for minifierPath.
Set minifierConfig to an empty object or a proper configuration object.