feat: support browser for walkIdentifiers

This commit is contained in:
zhiyuanzmj 2025-05-26 09:06:29 +08:00
parent 7201bf338d
commit 7874664d29
1 changed files with 0 additions and 8 deletions

View File

@ -30,10 +30,6 @@ export function walkIdentifiers(
parentStack: Node[] = [], parentStack: Node[] = [],
knownIds: Record<string, number> = Object.create(null), knownIds: Record<string, number> = Object.create(null),
): void { ): void {
if (__BROWSER__) {
return
}
const rootExp = const rootExp =
root.type === 'Program' root.type === 'Program'
? root.body[0].type === 'ExpressionStatement' && root.body[0].expression ? root.body[0].type === 'ExpressionStatement' && root.body[0].expression
@ -110,10 +106,6 @@ export function isReferencedIdentifier(
parent: Node | null, parent: Node | null,
parentStack: Node[], parentStack: Node[],
): boolean { ): boolean {
if (__BROWSER__) {
return false
}
if (!parent) { if (!parent) {
return true return true
} }