JSPM

metro-minify-swc

1.0.0-alpha
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 2
    • Score
      100M100P100Q28006F
    • License MIT

    Metro bundler minifier implementation using SWC

    Package Exports

    • metro-minify-swc
    • metro-minify-swc/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (metro-minify-swc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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