Skip to content

A high-performance drop-in replacement for Metro bundler's minifier using SWC ⚡️

License

Notifications You must be signed in to change notification settings

V3RON/metro-minify-swc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A high-performance drop-in replacement for Metro bundler's minifier using SWC ⚡️

Topics

Resources

License

Stars

Watchers

Forks