From a8dae9d567a6a7e2e00cc9ea99a0cde1476fcb4c Mon Sep 17 00:00:00 2001 From: Daniil Suvorov Date: Thu, 30 Oct 2025 11:04:14 +0300 Subject: [PATCH] fix: reduce size ```diff du -h swc_plugin_css_modules.wasm - 832K swc_plugin_pre_paths.wasm + 576K swc_plugin_pre_paths.wasm ``` --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 3e031d2..b28f1c4 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] pathdiff = "0.2"