From e475bae5b5d714723f3c7aa8552ecf254f4067b2 Mon Sep 17 00:00:00 2001 From: Daniil Suvorov Date: Thu, 30 Oct 2025 11:03:42 +0300 Subject: [PATCH] fix: reduce size ```diff du -h swc_plugin_css_modules.wasm - 2.5M swc_plugin_transform_remove_imports.wasm + 1.6M swc_plugin_transform_remove_imports.wasm ``` --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 6331472..19077e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,8 +7,16 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [profile.release] +# This removes more dead code +codegen-units = 1 lto = true +# Optimize for size +opt-level = "s" + +# Strip debug symbols +strip = "symbols" + [dependencies] digest = { version = "0.10", default-features = false }