Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.68 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.68 KB

metro-minify-swc

⚡️ Fast and efficient minification for Metro using SWC ⚡️

npm version License: MIT


🚀 A fast JavaScript minifier for Metro bundler using SWC (Speedy Web Compiler). This package provides a drop-in replacement for Metro's default minifier, offering improved performance through SWC's Rust-based implementation.

⚠️ Experimental Package Notice: This package is currently in an experimental stage and may not work correctly in all scenarios. If you encounter any issues or bugs while using it, please help improve the package by reporting them in the GitHub Issues section. Your feedback is valuable for making this package more stable and reliable!

✨ Features

  • 🔥 High Performance: Powered by SWC's Rust implementation for blazing fast minification
  • 🔄 Drop-in Replacement: Easy integration with Metro bundler
  • ⚙️ Configurable: Flexible configuration options for compression and mangling

📦 Installation

npm install --save-dev metro-minify-swc
# or
yarn add --dev metro-minify-swc
# or
pnpm add -D metro-minify-swc

🚀 Usage

Update your Metro configuration:

module.exports = {
  transformer: {
    minifierPath: 'metro-minify-swc',
    minifierConfig: {}, // Required - set to empty object for default settings
  },
};

You can customize the minification behavior by passing options to minifierConfig.

📄 License

MIT