Skip to content

Commit 8ceec29

Browse files
committed
refactor(swc): disable DEBUG_LOG and update useIntlayer condition for improved function handling
1 parent 2c82f1f commit 8ceec29

File tree

1 file changed

+4
-2
lines changed
  • packages/@intlayer/swc/src

1 file changed

+4
-2
lines changed

packages/@intlayer/swc/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use base62::encode as base62_encode;
2626
use twox_hash::XxHash64;
2727

2828

29-
static DEBUG_LOG: bool = true;
29+
static DEBUG_LOG: bool = false;
3030

3131

3232
// ─────────────────────────────────────────────────────────────────────────────
@@ -91,6 +91,8 @@ impl<'a> TransformVisitor<'a> {
9191

9292
static PACKAGE_LIST: LazyLock<Vec<Atom>> = LazyLock::new(|| {
9393
[
94+
"intlayer",
95+
"@intlayer/core",
9496
"react-intlayer",
9597
"react-intlayer/client",
9698
"react-intlayer/server",
@@ -158,7 +160,7 @@ impl<'a> VisitMut for TransformVisitor<'a> {
158160
}
159161
_ => return,
160162
};
161-
if callee_ident != "useIntlayer" {
163+
if callee_ident != "useIntlayer" && callee_ident != "getIntlayer" {
162164
return;
163165
}
164166

0 commit comments

Comments
 (0)