diff --git a/packages/compiler-core/src/babelUtils.ts b/packages/compiler-core/src/babelUtils.ts index 706832a8a8b..571f6175643 100644 --- a/packages/compiler-core/src/babelUtils.ts +++ b/packages/compiler-core/src/babelUtils.ts @@ -22,6 +22,10 @@ export function walkIdentifiers( parentStack: Node[] = [], knownIds: Record = Object.create(null) ) { + if (__BROWSER__) { + return + } + const rootExp = root.type === 'Program' && root.body[0].type === 'ExpressionStatement' && @@ -81,6 +85,10 @@ export function isReferencedIdentifier( parent: Node | null, parentStack: Node[] ) { + if (__BROWSER__) { + return false + } + if (!parent) { return true }